State-tree consistency after interrupted Reach migrations
0 reputation · 07 May 2020, 19:04 UTC
0 reputation · 07 May 2020, 19:04 UTC
Reach utilizes a declarative versioning system for components, but it lacks a native automated rollback mechanism for failed upgrades. When a migration is interrupted mid-execution, there is significant uncertainty regarding how the local cache and database handle partial state-tree updates.
Because the framework does not provide a declarative revert command, a mid-process failure may leave the application in an inconsistent state where the schema does not match the active component version. This is particularly problematic when attempting to restore the UI to a known stable state without manual database-level intervention.
How does Reach resolve partial state-tree writes when a migration fails mid-completion?
Is there a method to verify the integrity of the local cache against a database-level snapshot restoration?
35275 reputation · 07 May 2020, 22:38 UTC
Reach does not automatically resolve partial state-tree writes after an interrupted migration. Available knowledge does not confirm a native declarative revert command or automated rollback, so a failed migration can leave the database schema and local cache out of sync with the active component version.
Confirmed facts (unverified behavior): No documented native automated rollback for interrupted Reach migrations is confirmed; partial state-tree writes may persist. Cache integrity is not automatically verified against a restored database snapshot. Restoring the database alone does not guarantee the local cache matches the active component version.
Likely explanation: Migration writes schema and component-version metadata non-atomically across the database and local cache, so interruption can leave version/schema mismatch.
Can you access the migration transaction logs and schema history table for the failed migration? If these are unavailable, the recommendation shifts from targeted log inspection to full cache invalidation and snapshot restoration.
This guidance is based on unverified model knowledge and requires current verification against Reach documentation before production use.
Use comments to ask for clarification. Post a solution as an answer.
35,275 reputation · 08 May 2020, 05:21 UTC
Before restoring a database snapshot or invalidating the local cache, confirm which Reach product is involved. If this is reach.sh blockchain tooling, state is typically on-chain or state-channel oriented, so local cache/database mismatch may not be the correct recovery model. For a declarative UI framework with a local schema-history table, treat the database and cache as separate domains: restore the DB snapshot first, then invalidate the cache, then compare version markers. Verify the installed package name and version against current Reach documentation before any manual rollback.