lotus/chain
Masih H. Derkani d5f4d807d7 Prevent DDL re-execution during event index schema migrations
This enhancement optimizes the schema migration process for the event
index by preventing the redundant execution of Data Definition Language
(DDL) statements that define the event schema. Traditionally, these DDL
statements were grouped into a single slice, reflecting the most current
version of the event index schema. With each migration, this slice was
updated to the latest schema iteration, executing all statements in
bulk. Initially, this method sufficed as migrations were focused on
adding indices to existing table columns.

However, as the database schema evolves to meet new requirements, such
as the forthcoming migrations that involve changes to table schemas
(notably, indexing events by emitter actor ID instead of addresses),
the prior approach of bulk execution of DDL statements becomes
unsuitable: it will no longer be safe to repeatedly execute DDL
statements in previous migrations, because the upcoming one changes
`event` table column structure. To address this issue, the work here has
isolated the event index schema migrations on a per-version basis. This
adjustment ensures that only the necessary DDL statements are executed
during each migration, avoiding the inefficiencies and potential errors
associated with redundant executions.

The work here should also minimize the refactoring required for future
migrations, facilitating a smoother introduction of significant schema
updates.
2024-03-15 10:26:48 +00:00
..
actors chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
beacon chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
consensus chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
ethhashlookup simplify transaction hash db queries, prevent fd leaks 2023-01-30 11:03:12 -05:00
events Prevent DDL re-execution during event index schema migrations 2024-03-15 10:26:48 +00:00
exchange chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
gen chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
index Fix/texts (#11298) 2023-10-27 11:32:42 -07:00
market master-to-sturdy 2023-09-21 10:37:02 -05:00
messagepool chore: remove repetitive words 2024-03-15 13:44:34 +11:00
messagesigner misc: Drop the raft-cluster experiment 2023-11-29 17:28:46 +01:00
rand master-to-sturdy 2023-09-21 10:37:02 -05:00
state chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
stmgr fix: stmgr: do not use cached migration results if absent from the blockstore (#11663) 2024-03-14 11:04:13 -07:00
store fix: sync: atomically switch chains when checkpointing (#11595) 2024-01-26 08:50:32 -08:00
sub Fix/texts (#11298) 2023-10-27 11:32:42 -07:00
types chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
vectors lint, db timout, cfg rm 2023-09-29 11:56:10 -05:00
vm fix: nv21fix migration: correctly upgrade system actor 2023-11-09 14:14:41 -05:00
wallet chore: switch back to upstream ledger library (#11651) 2024-02-26 07:54:32 -08:00
badtscache.go bump libp2p version to v0.30 2023-11-21 22:10:40 +08:00
block_receipt_tracker.go refactor: update cache to the new generic version (#10463) 2023-03-13 15:29:09 -07:00
checkpoint.go fix: sync: atomically switch chains when checkpointing (#11595) 2024-01-26 08:50:32 -08:00
sync_manager_test.go fix make gen 2022-08-29 16:25:30 +02:00
sync_manager.go chore: remove repetitive words 2024-03-15 13:44:34 +11:00
sync_test.go master-to-sturdy 2023-09-21 10:37:02 -05:00
sync.go feat: drand: refactor round verification 2024-01-24 19:15:36 -05:00
syncstate.go Expose WorkerID 2020-10-28 20:22:07 +01:00
types_test.go fix make gen 2022-08-29 16:25:30 +02:00