Git Product home page Git Product logo

rocks-queue-java's People

Contributors

artiship avatar dependabot[bot] avatar pisecespeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

rocks-queue-java's Issues

The queue does not work, if I add more than 255 elements

Hello,

To reproduce this case, you need to perform the following steps:

  1. create queue
  2. enqueue 500 elements
  3. close the application (it helps to reset your in-memory pointer com.me.rocks.queue.RocksQueue#head
  4. start the application (in this moment, your queue load in-memory pointer from the disk)
  5. consume 500 elements
  6. 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.