forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
indexer: fix multi object updates in one checkpoint (MystenLabs#9945)
## Description PostgresWriteError("ON CONFLICT DO UPDATE command cannot affect row a second time"), we cannot update the same row for more than once in one query, thus splitting the commits here. ## Test Plan Local run on top of `releases/0.29` and make sure it can handle multiple object updates against staging ``` cargo run --bin sui-indexer -- --db-url "postgres://postgres:postgres@localhost/gegao" --rpc-client-url "http://lax-suifn-58113.staging.sui.io:9000" --client-metric-host "127.0.0.1" --client-metric-port 9184 --rpc-server-port 3030 --reset-db 2023-03-27T19:33:24.941550Z INFO sui_indexer::handlers::checkpoint_handler: Checkpoint 100 committed with 1 transactions and 1 object changes. 2023-03-27T19:33:25.195859Z INFO sui_indexer::handlers::checkpoint_handler: Checkpoint 101 committed with 1 transactions and 1 object changes. 2023-03-27T19:33:26.401435Z INFO sui_indexer::handlers::checkpoint_handler: Checkpoint 102 committed with 3 transactions and 3 object changes. 2023-03-27T19:33:27.914732Z INFO sui_indexer::handlers::checkpoint_handler: Checkpoint 103 committed with 4 transactions and 4 object changes. 2023-03-27T19:33:28.850721Z INFO sui_indexer::handlers::checkpoint_handler: Checkpoint 104 committed with 2 transactions and 2 object changes. 2023-03-27T19:33:30.301859Z INFO sui_indexer::handlers::checkpoint_handler: Checkpoint 105 committed with 4 transactions and 4 object changes. ... ``` Also added CI test for multiple object updates in one checkpoint
- Loading branch information
Showing
3 changed files
with
85 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters