Delete old objects when calling ObjectStore::put#1366
Conversation
3da8178 to
d822cde
Compare
Jarema
left a comment
There was a problem hiding this comment.
Thanks for catching and fixing this!
Would be really nice to have a test for it that checks the stream content after delete.
Are you able to contribute one?
16137d1 to
a5e350d
Compare
|
Added a test I'm not entirely sure how to do it without knowledge of the underlying implementation (stream name, chunk and meta topics). Let me know if you have a better idea. |
2f424b2 to
40fd0ce
Compare
40fd0ce to
2509d5a
Compare
|
I'm sorry, I just realized that I shouldn't have moved the test for validity of the (encoded) object name, which is purely client-side logic, to the middle of the function. My intention was to put the definition close to the use of the variable, but in this case I believe that it's wrong to return such an error after interaction with the server. Should I open another PR? |
When an object already exists in the object store,
ObjectStore::putis supposed to purge it. Currently, this does not happen because the object name is erroneously double-encoded.To reproduce:
Output:
After the changes introduced by this PR: