Skip to content

bug: wrong session id in on_disconnect() trigger #103

Closed
@Totktonada

Description

@Totktonada

Tarantool had a bug with on_disconnect triggers, see tarantool/tarantool#4627

Affected tarantool versions:

  • All 1.10* before 1.10.4-52-gcf99b51cf (exclusive).
  • All 2.1.
  • All 2.2* before 2.2.1-124-g581f3674e (exclusive).
  • All 2.3* before 2.3.0-236-g6da9d3953 (exclusive).

The module uses on_disconnect() triggers and may call box.session.id() after implicit yield (a :delete() call).

We possibly should work around this problem in the module itself, despite that it was fixed in recent tarantool versions.

The fix would be obvious: save a session_id at beginning of _on_consumer_disconnect() and pass it to :release() at the end (or, better, to an internal release function with this extra option to protect a user from using it). However I stuck for a while trying to write a test case that will show a bad behaviour of queue just using its public API.

Reported by @Mons.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions