Skip to content

seenMessages TTL should be based on last observed time, not first #502

@stbrody

Description

@stbrody

The seenMessage cache prevents us from processing and re-broadcasting a pubsub message that we have already seen within the seenMsgTTL (default 2 minutes). Accessing an existing message, however, does not update the timestamp associated with the entry in the cache.

This means that if a single pubsub message is being received frequently and consistently, we'll re-broadcast it every seenMsgTTL, rather than never re-broadcasting it as is the desired behavior. If every time we received a duplicate pubsub message we pushed back the expiration time in the cache, that would give us the desired behavior of never re-broadcasting a message that we have already seen within the last seenMsgTTL seconds.

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