Skip to content

ByteBuffer sorting changed in 0.9.0 #230

@ivenhov

Description

@ivenhov

Hi

I think 0.9.0 introduced regression where ByteBuffers comparison has changed.
This likely is a result of a change in #199
where custom comparator for byte[] and ByteBuffer has been swapped for Arrays.compare(o1, o2);

It seems original implementation was always using unsigned bytes.
Now default implementation uses unsigned bytes.
As far as I understand this can be modified by passing MDB_INTEGERKEY to _env.openDb and this is a setting persisted in Db.
This was never a requirement in previous versions so it seems existing databases are not compatible unless the flag is added in the code.

When I try to add that flag my tests still fail unable to either get key/value or iterate through them (iterator is empty).

This is likely related to
#228

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions