Skip to content

QueryIterPlainWrapper concurrency on close/cancelRequest #3755

@afs

Description

@afs

This is from #3753 (comment)

There is a race condition in QueryIterPlainWrapper and QueryIterAbortable which inherits from QueryIterPlainWrapper.

requestClose and close both call closeIterator but from different threads. closeIterator clears the iterator member.

Using synchronized on closeIterator and close should fix observed test failures (#3751).

However, these operations may cause internal state on the wrapped iterator.
hasNextBinding / moveToNextBinding / close (normal operation) will running on the query executiuon thread, so no concurrency issues,

But requestClose is called on a separate thread and it too may manipulate the internal state on the wrapped iterator.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions