Skip to content

docs(pycubrid): qualify non-atomic fallback in atomic-counter recipe - #634

Closed
Burakceliks wants to merge 1 commit into
cubrid-lab:mainfrom
Burakceliks:docs/qualify-atomic-counter-fallback
Closed

Burakceliks wants to merge 1 commit into
cubrid-lab:mainfrom
Burakceliks:docs/qualify-atomic-counter-fallback

Conversation

@Burakceliks

Copy link
Copy Markdown

Summary

  • Updated the Adaptation note in fundamentals/pycubrid/13_atomic_counters.py to clarify that INSERT ... ON DUPLICATE KEY UPDATE hit_count = hit_count + ? (ODKU) is the supported atomic SQL-side increment demonstration on standard CUBRID 11.2 setups.
  • Explicitly warned that a naive client-side 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.
  • Left all executable SQL/Python logic and golden outputs untouched.

Verification

  • python -m py_compile fundamentals/pycubrid/13_atomic_counters.py passed
  • python scripts/check_docs_sync.py, check_support_matrix_counts.py, check_dependency_floors.py, check_expected_coverage.py, lint_changelog.py, and check_docs_links.py (83 Markdown files) passed
  • python -m unittest discover -s tests -p "test_docs_sync.py" -v passed (23/23 tests)

Closes #626

@yeongseon yeongseon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Burakceliks

Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: qualify the non-atomic fallback suggested by the atomic-counter recipe

2 participants