Skip to content

The new_token parameter of Notifier.on_new_event seems to be misunderstood #19969

Description

@reivilibre

Notifier.on_new_event has a new_token parameter.

To me, it looks like that's supposed to get the stream's new position passed (as you'd get from .get_current_token() on an ID generator).

In actuality, for some stream types (e.g. thread subscriptions), we are passing the stream_id from newly-inserted rows. In a multi-writer setup, new rows don't immediately become the current stream position.

It seems it only matters for a small handful of stream types, so the relatively-new streams getting this wrong might not have any real issues from this misunderstanding.

  • identify and fix up the mistakes
  • there might be documentation to correct

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions