Description
Problem: currently different dfs snapshot files can be loaded as part of the same logical snapshot.
To reproduce: run --dbfilename=dump --proactor_threads=4
and save the snapshot, then
run --dbfilename=dump --proactor_threads=2
and save the snapshot. Then start again - dragonfly will load
all 4 shard files even though the last snapshot saved only 2 shard files.
The reason for this - we load all the matching files and the last 2 files dump-0002.dfs dump-0003.dfs
match.
The logic is rather naive and often creates confusion in the community deployments.
One solution could be - to introduce a metadata field SNAPSHOT_ID
stored in both summary and data files.
The id could be a random number and only the data files with matched SNAPSHOT_ID
should be considered for loading.