You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some time I am observing duplicate instances for my taskwarrior recurrences. After some investigation with the taskwarrior devs we suspect that this may be due to a race condition among multiple simultaneous task invocations from automated processes, that each independently trigger the logic of checking for and creating missing recurrence instances.
The only instance of background processes that talk to task on my system are two blocks in my i3status-rs bar, that fire at 60s intervals. I had a look in the code of that block and noted the existence of the rc.gc=off flag that is used by the block's code. From my understanding that is there to prevent the updating of task IDs as part of the counting operation to prevent any unwanted cross-talk with manually interacting with the task-db.
The taskwarrior devs now suggest to add another runtime config override here to prevent updating recurrence instances as part of the counting operation, namely rc.recurrence.limit=0.
Are there any objections to this idea? Maybe make this configurable?
In the meantime I have disabled one of the two blocks to validate that this stops the duplicates from appearing. If that works, there is a high chance, that this project is the source of the duplicates.
Update: after about one week with the second block disabled, I have not seen any further duplicate taskwarrior recurrence instances, strengthening the above suspicion that the status block is at fault here.
jkaiser-ioki
changed the title
taskwarrior block(s) may trigger duplicate recurrence instances
taskwarrior block(s) trigger duplicate recurrence instances
Sep 24, 2024
follow up: after 2 more month with only one of my two blocks the problem has not resurfaced.
Since I'd really like to have two instances of the taskwarrior block in my setup I'd appreciate at least some feedback here. I am not a rust expert but I could try to provide a PR with a fix (based on what the taskwarrior) devs have suggested.
For some time I am observing duplicate instances for my taskwarrior recurrences. After some investigation with the taskwarrior devs we suspect that this may be due to a race condition among multiple simultaneous
task
invocations from automated processes, that each independently trigger the logic of checking for and creating missing recurrence instances.The only instance of background processes that talk to
task
on my system are two blocks in myi3status-rs
bar, that fire at 60s intervals. I had a look in the code of that block and noted the existence of therc.gc=off
flag that is used by the block's code. From my understanding that is there to prevent the updating of task IDs as part of the counting operation to prevent any unwanted cross-talk with manually interacting with the task-db.The
taskwarrior
devs now suggest to add another runtime config override here to prevent updating recurrence instances as part of the counting operation, namelyrc.recurrence.limit=0
.Are there any objections to this idea? Maybe make this configurable?
In the meantime I have disabled one of the two blocks to validate that this stops the duplicates from appearing. If that works, there is a high chance, that this project is the source of the duplicates.
For reference, here is the ticket tracking this topic on the taskwarrior side: GothenburgBitFactory/taskwarrior#3550
The text was updated successfully, but these errors were encountered: