Skip to content

BlockingIdentifierGenerator invoked on wrong context under load #1595

Closed
@tsegismont

Description

@tsegismont

In BlockingIdentifierGenerator, when a new block is allocated, invocations of generate method are queued:

queue.add( () -> generate( session, entity ).thenAccept( result::complete ) );

After the result is received, queued tasks are executed:

The problem is that they are executed on the Vert.x context which made the database call, not the context they were operating on when they were queued.

This explains the error logs in quarkusio/quarkus#32533

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