Skip to content

Commit

Permalink
Fix version vector cleanup during client deactivation (#1068)
Browse files Browse the repository at this point in the history
This change fixes incorrect version vector persistence during client
deactivation. The issue occurred when an unnecessary UpdateVersionVector call
followed a successful document detachment, re-inserting a version vector that
should have been deleted.
  • Loading branch information
raararaara authored Nov 19, 2024
1 parent 5ec26f2 commit e629fd0
Show file tree
Hide file tree
Showing 2 changed files with 172 additions and 188 deletions.
12 changes: 0 additions & 12 deletions server/clients/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,6 @@ func Deactivate(
if err := cli.DetachDocument(ctx, project, actorID, docID, project.PublicKey, docInfo.Key); err != nil {
return nil, err
}

if err := be.DB.UpdateVersionVector(
ctx,
info,
types.DocRefKey{
ProjectID: refKey.ProjectID,
DocID: docID,
},
nil,
); err != nil {
return nil, err
}
}

return be.DB.DeactivateClient(ctx, refKey)
Expand Down
Loading

0 comments on commit e629fd0

Please sign in to comment.