Skip to content

Error message 'a patchset could not be applied' doesn't give enough information. #951

Description

@ximon18

This error message is caused by one of many different error returns from crates/zonedata/src/writer.rs that return PatchError::Inconsistency, but what kind of inconsistency?

In particular we have seen it from next_patchset() which has multiple such return paths, but from the error alone it is not possible to know which was triggered. Was it an inconsistent attempt to remove a SOA which does not exist? Was it an attempt to add the same record twice, or an attempt to add the same record twice? And which records were the cause of the problem?

One cannot simply add trace level logging as the zonedata crate has no support for logging or tracing, though cargo add tracing is one way to make that possible. An alternate approach would be to add a reason string to the Inconsistency enum variant and let the caller do the logging.

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