Repository navigation
docs(pycubrid): qualify non-atomic fallback in atomic-counter recipe - #634
Burakceliks wants to merge 1 commit into
Conversation
yeongseon
left a comment
There was a problem hiding this comment.
Reviewed the one-file documentation clarification at HEAD fd37f83. It accurately says that naive client-side SELECT-then-INSERT/UPDATE is not a concurrency-safe substitute for SQL-side ODKU. PR #631 already addresses this same exact docstring and additionally updates the recipe index; to avoid conflicting duplicate edits and to preserve both contributors' work, please coordinate one canonical wording before merge (prefer #631's cross-document coverage, incorporating any useful wording from here). Workflow runs are still action_required.
|
Thanks for reviewing @yeongseon! Agreed — PR #631 already covers both the docstring and the recipe index cleanly, so I'll close this PR in favor of #631 to avoid duplicate edits. |
Summary
Adaptation noteinfundamentals/pycubrid/13_atomic_counters.pyto clarify thatINSERT ... ON DUPLICATE KEY UPDATE hit_count = hit_count + ?(ODKU) is the supported atomic SQL-side increment demonstration on standard CUBRID 11.2 setups.SELECT-then-INSERT/UPDATE(read-modify-write) fallback is not concurrency-safe without its own concurrency/locking or compare-and-swap design, because concurrent writers can read the same count and overwrite increments or race to insert the same key.Verification
python -m py_compile fundamentals/pycubrid/13_atomic_counters.pypassedpython scripts/check_docs_sync.py,check_support_matrix_counts.py,check_dependency_floors.py,check_expected_coverage.py,lint_changelog.py, andcheck_docs_links.py(83 Markdown files) passedpython -m unittest discover -s tests -p "test_docs_sync.py" -vpassed (23/23 tests)Closes #626