Closed Orlion closed 2 months ago
First, you set the expiration time of the key in batch, The key is then immediately set to a new value, so any previous information will be overwritten, I think this is correct.
First, you set the expiration time of the key in batch, The key is then immediately set to a new value, so any previous information will be overwritten, I think this is correct.
I got it.
We have the following code:
Its output is
We expected to add an expiration time of 10 seconds to the key through
batch.Expire(key, time.Second*10)
, butbatch.Put(key, value2)
removed the expiration time incorrectly.I found this line in the code: https://github.com/rosedblabs/rosedb/blob/a89ea823e5b9d3f65422671410f082e0b47a255e/batch.go#L131
So, is it a bug?