-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Hello,
To reproduce this case, you need to perform the following steps:
- create queue
- enqueue
500elements - close the application (it helps to reset your in-memory pointer
com.me.rocks.queue.RocksQueue#head - start the application (in this moment, your queue load in-memory pointer from the disk)
- consume
500elements - you will notice, that you receive the wrong elements
The reason, that you use BigEndian order for bytes, but uint64add merge operator assumes to have LITTLE_ENDIAN - facebook/rocksdb#7243 and https://github.com/facebook/rocksdb/blob/main/utilities/merge_operators/uint64add.cc
I don't know how to fix it. Java Rocksdb API does not allow to create a new merge operator. Also, we cannot use LITTLE_ENDIAN, because it breaks the queue order.
I saw golang implementation of the queue. They created the own merge operator, but we cannot do it. https://github.com/mijia/rocksq/blob/master/merge.go
Metadata
Metadata
Assignees
Labels
No labels