Skip to content
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

Large Commit ID is persisted with different value than logged #855

Closed
andreiamariei opened this issue Jun 28, 2019 · 2 comments
Closed

Large Commit ID is persisted with different value than logged #855

andreiamariei opened this issue Jun 28, 2019 · 2 comments
Labels

Comments

@andreiamariei
Copy link
Contributor

@andreiamariei andreiamariei commented Jun 28, 2019

When using RANDOM CommitIdGenerator, Javers logs different Commit IDs than what's being actually persisted in the database.

The issue seems to be the conversion to double in CommitId.valueAsNumber().

Test (quickly written in spock):

def "large commit id test"() {
    expect:
        new CommitId(8804939115786087745, 0).valueAsNumber() == 8804939115786087745.00
}

results in:

Condition not satisfied:

new CommitId(8804939115786087745, 0).valueAsNumber() == 8804939115786087745.00
|                                    |               |
8804939115786087745.0                |               false
                                     8804939115786087424.00

@bartoszwalacik
Copy link
Member

@bartoszwalacik bartoszwalacik commented Jun 28, 2019

Hi , we will be happy to accept your pull request with the fix

@bartoszwalacik
Copy link
Member

@bartoszwalacik bartoszwalacik commented Jul 1, 2019

fixed in 5.6.1

andreiamariei added a commit to andreiamariei/javers that referenced this issue Jul 4, 2019
andreiamariei added a commit to andreiamariei/javers that referenced this issue Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants