Shreemanarjun / Shreemanarjun/datum

Missing conflict detection when remote entity is deleted

Open
#41 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
27
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Description

Currently, Datum does not detect conflicts when an entity exists locally but is missing on the remote.

During _pullChanges, only remote items are iterated. If an item was deleted on the remote, it is never seen, so:

  • No conflict is detected
  • DatumConflictResolver is never called
  • Local stale data remains after app restart
Expected behavior

When:

local != null && remote == null

This should be treated as a deletion conflict, and the conflictResolver should be invoked.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the _pullChanges entry point and trace how local and remote entity sets are compared. Inspect where DatumConflictResolver is invoked; done means a locally present but remotely missing entity is recognized as a deletion conflict and the resolver is called, with coverage for the local != null and remote == null case.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.