lotus/chain/events/filter
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
..
event_test.go chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
event.go chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
index_test.go chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
index.go Prevent DDL re-execution during event index schema migrations 2024-03-15 10:26:48 +00:00
mempool.go Store mapping from hashes for Ethereum transactions to Filecoin Message Cids 2023-01-16 01:17:56 -05:00
store.go NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00
tipset.go NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00