Skip to content

SDSTOR-22816: reject duplicate create_pg while inflight - #477

Merged
Hooper9973 merged 2 commits into
eBay:stable/v4.xfrom
Hooper9973:SDSTOR-22816-create-pg-duplicate
Oct 15, 2026
Merged

Hooper9973 merged 2 commits into
eBay:stable/v4.xfrom
Hooper9973:SDSTOR-22816-create-pg-duplicate

Conversation

@Hooper9973

Copy link
Copy Markdown
Contributor

A retry before create finishes returns RETRY_REQUEST and does not allocate a second repldev. Once the pg is in the map, a later duplicate with the same info returns success.

@Hooper9973
Hooper9973 force-pushed the SDSTOR-22816-create-pg-duplicate branch from 63cb52c to e0401a6 Compare October 9, 2026 03:09
A retry before create finishes returns RETRY_REQUEST and
does not allocate a second repldev. Once the pg is in the
map, a later duplicate with the same info returns success.
@Hooper9973
Hooper9973 force-pushed the SDSTOR-22816-create-pg-duplicate branch from e0401a6 to de48a55 Compare October 9, 2026 03:12
@codecov-commenter

codecov-commenter commented Oct 9, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 81.81818% with 4 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (stable/v4.x@d9a17ca). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/lib/homestore_backend/hs_pg_manager.cpp 81.81% 2 Missing and 2 partials ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@              Coverage Diff               @@
##             stable/v4.x     #477   +/-   ##
==============================================
  Coverage               ?   53.72%           
==============================================
  Files                  ?       39           
  Lines                  ?     6905           
  Branches               ?      941           
==============================================
  Hits                   ?     3710           
  Misses                 ?     2793           
  Partials               ?      402           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI 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.

🟡 Changes recommended

The new regression test can deadlock when a fatal assertion fails.

1 open finding
What changed in this PR

Prevents concurrent duplicate PG creation from allocating multiple replication devices.

Changes:

  • Tracks in-flight PG creations under the PG lock.
  • Returns RETRY_REQUEST for concurrent duplicates and adds regression coverage.
  • Bumps the package version to 4.3.6.
File Description
hs_pg_tests.cpp Tests duplicate creation during an in-flight request.
hs_pg_manager.cpp Adds atomic admission and cleanup for PG creation.
hs_homeobject.hpp Stores in-flight PG identifiers.
conanfile.py Bumps package version.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/lib/homestore_backend/tests/hs_pg_tests.cpp
Comment thread src/lib/homestore_backend/hs_pg_manager.cpp Outdated
@xiaoxichen

Copy link
Copy Markdown
Collaborator

feel free to merge once Yawen gives her approval.
Please also communicate with CM team for this changes

@Hooper9973
Hooper9973 requested a review from Besroy October 15, 2026 06:59

@Besroy Besroy 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.

LGTM

@Hooper9973
Hooper9973 merged commit fff21f7 into eBay:stable/v4.x Oct 15, 2026
49 of 50 checks passed
@Hooper9973
Hooper9973 deleted the SDSTOR-22816-create-pg-duplicate branch October 15, 2026 08:54
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.

5 participants