-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "indexer: cp sequence number for tx indices query perf (#16617…
…)" (#16816) This reverts commit 75afd6c. ## Description This is an indexer breaking change and as a result should not be merged just yet before the corresponding backfill is done. ## Test Plan test on benchmark to make sure that after this revert, the schema is compatible with one before. ## Prevention Plan next time for breaking change, I will add `[NO COMMIT] indexer breaking change` as the prefix. --- If your changes are not user-facing and do not break anything, you can skip the following section. Otherwise, please briefly describe what has changed under the Release Notes section. ### Type of Change (Check all that apply) - [ ] protocol change - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes
- Loading branch information
Showing
14 changed files
with
71 additions
and
85 deletions.
There are no files selected for viewing
5 changes: 0 additions & 5 deletions
5
crates/sui-indexer/migrations/2023-10-06-204335_tx_indices/down.sql
This file was deleted.
Oops, something went wrong.
47 changes: 0 additions & 47 deletions
47
crates/sui-indexer/migrations/2023-10-06-204335_tx_indices/up.sql
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
crates/sui-indexer/migrations/2023-10-06-204335_tx_recipients/down.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- This file should undo anything in `up.sql` | ||
DROP TABLE IF EXISTS tx_recipients; |
8 changes: 8 additions & 0 deletions
8
crates/sui-indexer/migrations/2023-10-06-204335_tx_recipients/up.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-- Your SQL goes here | ||
CREATE TABLE tx_recipients ( | ||
tx_sequence_number BIGINT NOT NULL, | ||
-- SuiAddress in bytes. | ||
recipient BYTEA NOT NULL, | ||
PRIMARY KEY(recipient, tx_sequence_number) | ||
); | ||
CREATE INDEX tx_recipients_tx_sequence_number_index ON tx_recipients (tx_sequence_number ASC); |
2 changes: 2 additions & 0 deletions
2
crates/sui-indexer/migrations/2023-10-06-204340_tx_senders/down.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- This file should undo anything in `up.sql` | ||
DROP TABLE IF EXISTS tx_senders; |
8 changes: 8 additions & 0 deletions
8
crates/sui-indexer/migrations/2023-10-06-204340_tx_senders/up.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-- Your SQL goes here | ||
CREATE TABLE tx_senders ( | ||
tx_sequence_number BIGINT NOT NULL, | ||
-- SuiAddress in bytes. | ||
sender BYTEA NOT NULL, | ||
PRIMARY KEY(sender, tx_sequence_number) | ||
); | ||
CREATE INDEX tx_senders_tx_sequence_number_index ON tx_senders (tx_sequence_number ASC); |
2 changes: 2 additions & 0 deletions
2
crates/sui-indexer/migrations/2023-10-06-204348_tx_input_objects/down.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- This file should undo anything in `up.sql` | ||
DROP TABLE IF EXISTS tx_input_objects; |
7 changes: 7 additions & 0 deletions
7
crates/sui-indexer/migrations/2023-10-06-204348_tx_input_objects/up.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Your SQL goes here | ||
CREATE TABLE tx_input_objects ( | ||
tx_sequence_number BIGINT NOT NULL, | ||
-- Object ID in bytes. | ||
object_id BYTEA NOT NULL, | ||
PRIMARY KEY(object_id, tx_sequence_number) | ||
); |
2 changes: 2 additions & 0 deletions
2
crates/sui-indexer/migrations/2023-10-06-204352_tx_changed_objects/down.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- This file should undo anything in `up.sql` | ||
DROP TABLE IF EXISTS tx_changed_objects; |
7 changes: 7 additions & 0 deletions
7
crates/sui-indexer/migrations/2023-10-06-204352_tx_changed_objects/up.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Your SQL goes here | ||
CREATE TABLE tx_changed_objects ( | ||
tx_sequence_number BIGINT NOT NULL, | ||
-- Object Id in bytes. | ||
object_id BYTEA NOT NULL, | ||
PRIMARY KEY(object_id, tx_sequence_number) | ||
); |
2 changes: 2 additions & 0 deletions
2
crates/sui-indexer/migrations/2023-10-06-204400_tx_calls/down.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- This file should undo anything in `up.sql` | ||
DROP TABLE IF EXISTS tx_calls; |
14 changes: 14 additions & 0 deletions
14
crates/sui-indexer/migrations/2023-10-06-204400_tx_calls/up.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-- Your SQL goes here | ||
CREATE TABLE tx_calls ( | ||
tx_sequence_number BIGINT NOT NULL, | ||
package BYTEA NOT NULL, | ||
module TEXT NOT NULL, | ||
func TEXT NOT NULL, | ||
-- 1. Using Primary Key as a unique index. | ||
-- 2. Diesel does not like tables with no primary key. | ||
PRIMARY KEY(package, tx_sequence_number) | ||
); | ||
|
||
CREATE INDEX tx_calls_module ON tx_calls (package, module, tx_sequence_number); | ||
CREATE INDEX tx_calls_func ON tx_calls (package, module, func, tx_sequence_number); | ||
CREATE INDEX tx_calls_tx_sequence_number ON tx_calls (tx_sequence_number); |
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