lotus/chain/events
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
..
filter Prevent DDL re-execution during event index schema migrations 2024-03-15 10:26:48 +00:00
state chore: remove repetitive words 2024-03-15 13:44:34 +11:00
cache.go chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
events_called.go chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
events_height.go chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
events_test.go chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
events.go chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
message_cache.go chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
observer.go chore: Merge nv22 into master (#11699) 2024-03-12 10:33:58 +01:00
tscache_test.go fix make gen 2022-08-29 16:25:30 +02:00
tscache.go chore: fix imports 2022-06-14 17:00:51 +02:00
utils.go chore: fix imports 2022-06-14 17:00:51 +02:00