The way the OperationsQueue is closed is not adequate: it's closed at the end of MongoDBDialect.executeBatch *but* MongoDBDialect.executeBatch can be called in a getAssociation call. This causes the OperationsQueue to be closed just after the getAssociation when we remove an association while we still have to effectively delete the association. |