Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data loss/corruption in database (possible concurrency issue?) #3460

Open
v0lker opened this issue May 17, 2024 · 1 comment
Open

data loss/corruption in database (possible concurrency issue?) #3460

v0lker opened this issue May 17, 2024 · 1 comment
Labels
eval:incomplete type:bug Something isn't working

Comments

@v0lker
Copy link

v0lker commented May 17, 2024

version 3 made me somewhat unhappy -- all of a sudden, some (but not all!) recurrent tasks were duplicated, with some having a different, but some even having the same mask index.

when i tried to downgrade to 2.6.2, though, the fun (horror) started for real:

task 3.0.2
   Platform: Darwin

Compiler
    Version: Apple LLVM 15.0.0 (clang-1500.1.0.2.5)
       Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
 Compliance: C++17

Build Features
      CMake: 3.29.2
    libuuid: libuuid + uuid_unparse_lower
 Build type: MacPorts

Configuration
       File: [...] (found), 2701 bytes, mode 100600
       Data: [...] (found), dir, mode 40710
    Locking: Enabled
         GC: Disabled
    $EDITOR: vim
Hooks
     System: Enabled
   Location: [...]
             (-none-)

Tests
   Terminal: 367x101
       Dups: Scanned 1965 tasks for duplicate UUIDs:
             No duplicates found
 Broken ref: Scanned 1965 tasks for broken references:
             Task b0246faf-48ca-4cd8-9f4c-cbfbe67384de depends on nonexistent task: 113b3e82-853c-4697-810d-c3028f12bdc3
             Task 6b7feec8-785c-4dde-9042-06735df0a584 depends on nonexistent task: 71ca5b38-bce3-4c0e-b945-b93122362a28
             Task 3b8f7a3b-6cb5-4ade-962b-4241cdbd5c49 depends on nonexistent task: eb7c22f7-8ffc-4d98-81ae-99c59097862a
             Task 070ff6c3-5119-4cba-8d4e-38486a588b0f depends on nonexistent task: a45d1696-4dc3-4143-bff0-9541fbfdfe68
             Task 070ff6c3-5119-4cba-8d4e-38486a588b0f depends on nonexistent task: eb7c22f7-8ffc-4d98-81ae-99c59097862a

looked at the sqlite db with sqlitebrowser when what tw 3.0.2 exported to JSON couldn't be imported by 2.6.2. there i noticed that some times, in the operations table there is a sequence of

  • "UndoPoint"
  • "Create ... uuid: "
  • "UndoPoint"

where the is then nowhere else to be found in the operations table, and the tasks table has only the entry <uuid> {}

no idea what that task might have been, but it might have been important. i haven't looked very closely, but there are at least two of them.

things that might be a bit uncommon:

  • i have a bunch of scripts calling taskwarrior, some of which might run concurrently.
  • i have garbage collection disabled by default (then that's overwritten by one of the scripts, which also deletes some tasks.
@djmitche
Copy link
Collaborator

When you say the recurrent tasks were duplicated, I think you are talking about the "parent" tasks, right? Do you mean they appeared twice with different UUIDs? Was one of those UUIDs the same as that from 2.6.2? Did this occur just from task import or were there further commands run?

The solo "Create" is interesting. Do you have an idea what task operation caused that? Do you see the matching UUID in your 2.6.2 data?

@djmitche djmitche added type:bug Something isn't working eval:incomplete labels Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eval:incomplete type:bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants