Skip to content

fix(redis): prevent concurrent list edit races and lossy binary edits (#1009) - #1017

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1009-redis-list-edit-concurrency-binary
Sep 27, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1009-redis-list-edit-concurrency-binary

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1009

Summary of Changes

  1. Optimistic concurrency verification:
    • In _listSet, reads lindex immediately before LSET and aborts if value differs from what was displayed, reloading latest list state and displaying a concurrency notice.
    • In _listRemove, checks lindex before generating sentinel and executing LSET/LREM, aborting safely if concurrent modification occurred.
  2. Sentinel cleanup:
    • Added best-effort cleanup in _listRemove catch block if connection drops after LSET.
    • Added automatic detection and orphaned sentinel cleanup (_isOrphanedDeleteSentinel via LREM key 0 sentinel) when loading list pages.
  3. Binary safety:
    • In _IndexedValueRow and _buildListEditor, disabled text editing for non-UTF8 items (!item.isUtf8), displayed a binary indicator badge, and prevented lossy .label overwrites while keeping deletion functional.
  4. Tests:
    • Added unit and widget tests covering concurrent modification abort on list edit and delete, binary item badge and edit disablement, and orphaned sentinel cleanup on list load.

@github-actions github-actions Bot added bug Something isn't working connections Database connections, URI parsing, pools data-grid Interactive data grid, cell editor, filtering, groupings labels Sep 27, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 7ab42c4 into dev Sep 27, 2026
3 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/1009-redis-list-edit-concurrency-binary branch September 28, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working connections Database connections, URI parsing, pools data-grid Interactive data grid, cell editor, filtering, groupings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant