You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use dual schema writer in MemDB to write both legacy and unified schemas
MemDB supports both legacy and unified schema storage, but was only
using LegacySchemaWriterAdapter which after our changes no longer writes
the legacy schema hash. This caused TestUnifiedSchemaHashWatch to fail
with a timeout waiting for hash updates.
Changes:
1. Updated SchemaWriter() to return a dualSchemaWriter that writes to
both legacy and unified storage (SchemaModeReadNewWriteBoth)
2. Refactored schema writing methods to avoid deadlocks:
- Added writeStoredSchemaNoLock() that uses the transaction's
db handle without acquiring additional locks
- Added writeSchemaHashNoLock() for transaction-scoped hash writes
- Added writeLegacySchemaHashFromDefinitionsNoLock() for legacy hash
3. Updated WriteStoredSchema() and WriteLegacySchemaHashFromDefinitions()
to use the transaction's db handle via txSource()
This ensures MemDB writes to both storages and properly updates the
schema hash for watchers, fixing the unified schema hash watch test.
0 commit comments