[BUG] when snapshot metadata has no size, it's treated as live even if it is not #1071
Open
3 tasks done
Labels
bug
Something isn't working
Describe the bug
Trying to upgrade an index node that is based on an image from before #940 to one after #1030 will cause it to attempt to delete all snapshot metadata for its partition because it will think the metadata is all stale live metadata and then crash when that fails.
This is because of two things
To workaround it, I think we would need to update our snapshot metadata zk nodes to have non-zero sizes for the persistent snapshots, which we could do by either
To fix it so we don't need an ops workaround, we could revert the
SnapshotMetadata::isLive
back to the previous implementation, or some other implementation that is tolerant of previous SnapshotMetadata schemas (eg use -1 as the size for live snapshots so it doesn't overlap with the default value, or just introduce a new field to mark liveness).I think reverting back to checking the prefix of the id is the best least effort solution with the current state of things as the code that adds the prefix is still in place, and there is another part of astra that references it, the query service:
astra/astra/src/main/java/com/slack/astra/logstore/search/AstraDistributedQueryService.java
Lines 305 to 309 in 26f72e9
astra/astra/src/main/java/com/slack/astra/logstore/search/AstraDistributedQueryService.java
Lines 322 to 326 in 26f72e9
Requirements (place an
x
in each of the[ ]
)**To Reproduce
Expected behavior
Not crashing.
Screenshots
If applicable, add screenshots to help explain your problem.
Reproducible in:
Astra version:
JVM version:
OS version(s):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: