Remove deleted/purged data from bucket not possible? #6015
-
I am using KV Store and sometimes I need to delete keys that might never exist again. I am first deleting the keys and then also purging but the bucket never shrinks and the watcher gets the purge updates. I tried the compact command but this still does not remove the purged keys. Is there another command to get rid of purged values? My concern is what happens if I have 3 gigabytes of deleted/purged values I will never access or use those values again? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Do you have some sample code you could share? |
Beta Was this translation helpful? Give feedback.
-
At this point your available workaround is to do a purge (specifying the key(s) you want to delete as part of the subject filter passed to that purge command) directly on the stream underlying your KV bucket after or instead of doing the KV delete for those key(s). |
Beta Was this translation helpful? Give feedback.
-
I will resolve this one as purging the stream subject works. One detail is that the subjects are also prefixed for KV with '$KV' so in my case I had 'foo.bar.>' and had to pass as filter '$KV.foo.bar.>'. Is there a reason why this is not exposed in the SDKs? It seems to be very useful for some use cases. |
Beta Was this translation helpful? Give feedback.
At this point your available workaround is to do a purge (specifying the key(s) you want to delete as part of the subject filter passed to that purge command) directly on the stream underlying your KV bucket after or instead of doing the KV delete for those key(s).