Skip to content

Problem with fetching snapshot by commit id (from version 5.6.1) when using MongoDB #958

@patpro1

Description

@patpro1

Update from version 5.6.0 to 5.6.1 contains change in this line in MongoRepository.java (

.map(CommitId::valueAsNumber).collect(Collectors.toSet()));
):

.map(c -> c.valueAsNumber().doubleValue()).collect(Collectors.toSet()));

was changed to:

.map(CommitId::valueAsNumber).collect(Collectors.toSet()));

After that change when snapshot has commit id with minor version different than 0 (e.g. 372136.02) this snapshot is not fetched from repository by commit id - problem is in passing BigDecimal value to query instead of double value (with double value snapshot is returned without problems - checked by debugging on line

if (coreConfiguration.getCommitIdGenerator() == CommitIdGenerator.SYNCHRONIZED_SEQUENCE) {
)

I've added screens from debug between two version to explain the problem:

VERSION 5.6.0

Correct behavior of version 5 6 0

VERSION 5.6.1

Wrong behavior of version 5 6 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions