mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Clear old Validations during online delete (RIPD-870):
* Add Validations.LedgerSeq and .InitialSeq fields. * Clean up logging. * Lower online delete minimum for standalone mode. * Unit tests of online_delete.
This commit is contained in:
committed by
Nik Bougalis
parent
70d5c4eca7
commit
eb62959216
@@ -90,14 +90,29 @@ const char* LedgerDBInit[] =
|
||||
);",
|
||||
"CREATE INDEX IF NOT EXISTS SeqLedger ON Ledgers(LedgerSeq);",
|
||||
|
||||
// InitialSeq field is the current ledger seq when the row
|
||||
// is inserted. Only relevant during online delete
|
||||
"CREATE TABLE IF NOT EXISTS Validations ( \
|
||||
LedgerSeq BIGINT UNSIGNED, \
|
||||
InitialSeq BIGINT UNSIGNED, \
|
||||
LedgerHash CHARACTER(64), \
|
||||
NodePubKey CHARACTER(56), \
|
||||
SignTime BIGINT UNSIGNED, \
|
||||
RawData BLOB \
|
||||
);",
|
||||
// This will error out if the column already exists,
|
||||
// but DatabaseCon intentionally ignores errors.
|
||||
"ALTER TABLE Validations \
|
||||
ADD COLUMN LedgerSeq BIGINT UNSIGNED;",
|
||||
"ALTER TABLE Validations \
|
||||
ADD COLUMN InitialSeq BIGINT UNSIGNED;",
|
||||
|
||||
"CREATE INDEX IF NOT EXISTS ValidationsByHash ON \
|
||||
Validations(LedgerHash);",
|
||||
"CREATE INDEX IF NOT EXISTS ValidationsBySeq ON \
|
||||
Validations(LedgerSeq);",
|
||||
"CREATE INDEX IF NOT EXISTS ValidationsByInitialSeq ON \
|
||||
Validations(InitialSeq, LedgerSeq);",
|
||||
"CREATE INDEX IF NOT EXISTS ValidationsByTime ON \
|
||||
Validations(SignTime);",
|
||||
|
||||
|
||||
Reference in New Issue
Block a user