Skip to content

Commit

Permalink
add document to reindex
Browse files Browse the repository at this point in the history
  • Loading branch information
v9n committed Jan 29, 2024
1 parent a95a58c commit c175997
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,25 @@ query {
}
```

# Local development
# Local development

# Re-indexing

When changing code we would need to re-index follow this process.

1. Stop the existing index process

2. Reset the state

```
subql-node reindex -f ./ --db-schema=turing --targetHeight=the-block-to-start-the-reindex --log-level=trace
```

After running this, the metadata and pointer will be reset to the `targetHeight`
all data higher than or equal to that block height is delete and we are ready to
resume the index process

3. Resume the index process

We write code in an idempotent way so we will be able to restart from that
height

0 comments on commit c175997

Please sign in to comment.