yorkie
yorkie copied to clipboard
Introduce repository method for only fetching SnapshotInfo's metadata
What would you like to be added: Introduce new repository method which only fetching SnapshotInfo's metadata The SnapshotInfo's metadata that i'm suggesting contains fields except for 'Snapshot' field
Why is this needed: Snapshot field of SnapshotInfo would be a large field, As document getting bigger and bigger. large SnapShot field would require many Network bandwidth and I/O time
snapshots.go#storeSnapshot always fetch every field of snapshotInfo
https://github.com/yorkie-team/yorkie/blob/50d8722d50b2e2ab48cdc59d00b296042ddaf66b/server/packs/snapshots.go#L36-L38
But sadly, 'SnapShot' field of SnapshotInfo is necessary, only when a below conditions are satisfied.
https://github.com/yorkie-team/yorkie/blob/50d8722d50b2e2ab48cdc59d00b296042ddaf66b/server/packs/snapshots.go#L42-L47
To sum up, I want to suggest separating SnapShotInfo related repository into two parts. one is a method that fetching only metadata of SnapshotInfo another is a method that fetching only Snapshot field of SnapshotInfo