twenty icon indicating copy to clipboard operation
twenty copied to clipboard

Concurrency issue when updating view filters

Open FelixMalfait opened this issue 1 year ago • 5 comments

Not sure if it's something we want to solve, but just logging it to discuss it quickly. The way we update view filter is not idempotent ; if we click twice quickly it generates an error.

Screenshot 2023-12-10 at 14 58 41 Screenshot 2023-12-10 at 15 04 08 Screenshot 2023-12-10 at 15 04 20
### Tasks

FelixMalfait avatar Dec 10 '23 14:12 FelixMalfait

Il we click twice on what?

Bonapara avatar Dec 10 '23 18:12 Bonapara

@Bonapara On "update view" (in my case, as can be seen in screenshot it's "deleteViewFilter" in particular that caused the issue)

FelixMalfait avatar Dec 10 '23 18:12 FelixMalfait

On my side, the filter appears multiple times on the filter bar when I click on "update view" even once. Do you think it's related @FelixMalfait?

Screenshot 2023-12-11 at 10 04 58 Screenshot 2023-12-11 at 10 03 19

Bonapara avatar Dec 11 '23 09:12 Bonapara

Switch to createMany, updateMany, deleteMany

charlesBochet avatar Dec 11 '23 13:12 charlesBochet

We could probably add a debounce on the "update view" button as a first step / good enough quickfix

FelixMalfait avatar Jan 17 '24 14:01 FelixMalfait

Tested today. Issue is still there.

FelixMalfait avatar Feb 21 '24 14:02 FelixMalfait

@FelixMalfait solved in v0.3.3!

charlesBochet avatar Mar 22 '24 21:03 charlesBochet