Skip to content

ZooReaderWriter.mutateExisting returns null if the Mutator did not change the entry #5063

@ctubbsii

Description

@ctubbsii

If the Mutator returns null, indicating that the mutator did not change anything, that null result skips setting anything on the ZK node. There are a few problems with this:

  1. The behavior of returning null is not well defined in the Mutator class (null means don't set anything? empty byte array means clobber the existing?)
  2. mutateExisting behavior is not well defined (should it return the current data if it is unchanged?)
  3. mutateExisting implementation returns the mutate result, whether or not the data was unchanged

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions