Skip to content

ExtendedQueryStateMachine.cancel cancels promises without putting backend back in idle state #570

@ahoppen

Description

@ahoppen

In my opinion, the following code does not make sense because it cancels promises without putting the backend back into the idle state, which leaves the backend and frontend state out of sync. In practice this doesn’t matter since we can’t cancel a query before having a row stream so this code should never be called.

self.isCancelled = true
switch queryContext.query {
case .unnamed(_, let eventLoopPromise), .executeStatement(_, let eventLoopPromise):
return .failQuery(eventLoopPromise, with: .queryCancelled)
case .prepareStatement(_, _, _, let eventLoopPromise):
return .failPreparedStatementCreation(eventLoopPromise, with: .queryCancelled)

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