New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serialization of negative varints is broken #5656
Comments
Should this be backported? |
avikivity
pushed a commit
that referenced
this issue
Feb 2, 2020
We would sometimes produce an unnecessary extra 0xff prefix byte. The new encoding matches what cassandra does. This was both a efficiency and correctness issue, as using varint in a key could produce different tokens. Fixes #5656 Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com> (cherry picked from commit c89c90d)
avikivity
pushed a commit
that referenced
this issue
Feb 2, 2020
We would sometimes produce an unnecessary extra 0xff prefix byte. The new encoding matches what cassandra does. This was both a efficiency and correctness issue, as using varint in a key could produce different tokens. Fixes #5656 Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com> (cherry picked from commit c89c90d)
avikivity
pushed a commit
that referenced
this issue
Feb 2, 2020
We would sometimes produce an unnecessary extra 0xff prefix byte. The new encoding matches what cassandra does. This was both a efficiency and correctness issue, as using varint in a key could produce different tokens. Fixes #5656 Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com> (cherry picked from commit c89c90d)
Backported to 3.3, 3.2, 3.1. |
reproducer by @espindola
|
avikivity
pushed a commit
to avikivity/scylladb
that referenced
this issue
Apr 28, 2020
We would sometimes produce an unnecessary extra 0xff prefix byte. The new encoding matches what cassandra does. This was both a efficiency and correctness issue, as using varint in a key could produce different tokens. Fixes scylladb#5656 Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com> (cherry picked from commit c89c90d)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running the following CQL on an empty database
In scylla produces the sstable
With cassandra I get
Note how the scylla sstable has an extra 0xff at the start of the varint value.
When prepared statements are used, scylla writes the value produced by the driver, so the bug is hidden.
The text was updated successfully, but these errors were encountered: