Skip to content

Commit

Permalink
WIP - Correctly set merkle schema version key
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSisley committed Nov 20, 2024
1 parent 593e947 commit df0a6c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/db/fetcher/versioned.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func (vf *VersionedFetcher) merge(c cid.Cid) error {
if !exists {
mcrdt = merklecrdt.NewMerkleCompositeDAG(
vf.store,
keys.CollectionSchemaVersionKey{},
keys.NewCollectionSchemaVersionKey(block.Delta.GetSchemaVersionID(), vf.col.Description().RootID),
vf.dsKey.WithFieldID(core.COMPOSITE_NAMESPACE),
)
vf.mCRDTs[0] = mcrdt
Expand All @@ -355,7 +355,7 @@ func (vf *VersionedFetcher) merge(c cid.Cid) error {
if !exists {
mcrdt, err = merklecrdt.FieldLevelCRDTWithStore(
vf.store,
keys.CollectionSchemaVersionKey{},
keys.NewCollectionSchemaVersionKey(block.Delta.GetSchemaVersionID(), vf.col.Description().RootID),
field.Typ,
field.Kind,
vf.dsKey.WithFieldID(fmt.Sprint(field.ID)),
Expand Down

0 comments on commit df0a6c3

Please sign in to comment.