Skip to content

FSET if field doesn't exist #807

@rezo1134

Description

@rezo1134

Is there a way or appetite to implement an atomic "get then set if not found" operation?

My current use case is that i'm consuming a stream of points and would like to natively keep count of points that match already inserted objects as a field of the matched object. I run multiple clients that connect and work on the same key, and so ideally, i'd like a way to implement a simple locking mechanism via fset/fget. The simplest thing would be if something like the nx operation was usable on fset so that it would ONLY set if the field doesn't exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions