diff --git a/server/backend/database/database.go b/server/backend/database/database.go index 6362bb6d6..aa35327b2 100644 --- a/server/backend/database/database.go +++ b/server/backend/database/database.go @@ -212,7 +212,12 @@ type Database interface { FindSnapshotInfoByID(ctx context.Context, id types.ID) (*SnapshotInfo, error) // FindClosestSnapshotInfo finds the closest snapshot info in a given serverSeq. - FindClosestSnapshotInfo(ctx context.Context, docID types.ID, serverSeq int64, includeSnapshot bool) (*SnapshotInfo, error) + FindClosestSnapshotInfo( + ctx context.Context, + docID types.ID, + serverSeq int64, + includeSnapshot bool, + ) (*SnapshotInfo, error) // FindMinSyncedSeqInfo finds the minimum synced sequence info. FindMinSyncedSeqInfo(ctx context.Context, docID types.ID) (*SyncedSeqInfo, error) diff --git a/server/backend/database/memory/database.go b/server/backend/database/memory/database.go index 737de10d0..1b5c8582f 100644 --- a/server/backend/database/memory/database.go +++ b/server/backend/database/memory/database.go @@ -1012,7 +1012,7 @@ func (d *DB) FindClosestSnapshotInfo( ID: info.ID, DocID: info.DocID, ServerSeq: info.ServerSeq, - Lamport: info.Lamport, + Lamport: info.Lamport, CreatedAt: info.CreatedAt, } if includeSnapshot { diff --git a/server/backend/database/snapshot_info.go b/server/backend/database/snapshot_info.go index 4e37e87a0..f5f29e167 100644 --- a/server/backend/database/snapshot_info.go +++ b/server/backend/database/snapshot_info.go @@ -50,11 +50,11 @@ func (i *SnapshotInfo) DeepCopy() *SnapshotInfo { } return &SnapshotInfo{ - ID: i.ID, - DocID: i.DocID, - ServerSeq: i.ServerSeq, - Lamport: i.Lamport, - Snapshot: i.Snapshot, - CreatedAt: i.CreatedAt, + ID: i.ID, + DocID: i.DocID, + ServerSeq: i.ServerSeq, + Lamport: i.Lamport, + Snapshot: i.Snapshot, + CreatedAt: i.CreatedAt, } }