pimutils / pimutils/vdirsyncer

Request mechanism to debug "multiple items with the same UID"

Open
#1,093 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: question
Dominant language
Python
Stars
1.9k
Forks
185
Avg merge
11h 49m
Merged PRs (30d)
1

Description

  • vdirsyncer 0.19.2 on python 3.11.5, Fedora 37
  • Syncing to davmail

I recently started having vdirsyncer "sync" failure and the system threw up an error about "multiple items with the same UID" (aka IdentConflict). I've had this once before, but I didn't have a good experience recovering from that with repair and/or other things I did trying to resolve the problem in my ignorance.

This time I wanted to know what event or events were bad before anything else. However, figuring this out was non-obvious. The path-like names didn't convey any information. I instrumented the code to dump href, etag, and ident; but again this did not reveal any information and looking at previously stored files and contents did not turn up any of these strings.

Finally, I put something in dav.py in the get_multi function to print out all objects href, raw, and etag. Finally I was able to cross-reference the href that was marked as failed against something useful (a pretty opaque "raw" description of the event). This let me figure out what event it was and I decided I didn't care about the duplicated events and nuked them from the server using the native client (fortunately an option for me).

Providing a mechanism to dump this "raw" data when we get this duplicate UID would make life much better if someone else (or me, a few months from now) encounters this server-side issue to allow more clarity on the problem. Issue #210 would be another to possibly resolve the issue.

Don't get me wrong, if you wanted to figure out some magic to understand that the events were distinct (or identical, it was day one and day two of an event that someone probably created in a weird way) to avoid the problem, all the better. But providing enough information to let humans figure out what is wrong is a good first step.

Thanks for the software, it makes my life much much better.

Contributor guide

Open the contributing guide

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 with dav.py and its get_multi function, then trace how IdentConflict is reported when multiple items share a UID. Use the issue's href, raw, and etag observations as the debugging context; done means a mechanism exposes enough raw item data to identify the conflicting events.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.