-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: engine unmap uses write lock #1447
Conversation
Otherwise, there will be a race between unmap and write operations. Longhorn 6406 Signed-off-by: Shuo Wu <[email protected]>
WalkthroughThis pull request updates the Changes
Sequence Diagram(s)sequenceDiagram
participant C as Caller
participant CT as Controller
C->>CT: Invoke UnmapAt(length, off)
CT->>CT: Acquire write lock (Lock)
alt Valid conditions
CT->>CT: Perform unmap operations
else Invalid offset or state
CT->>CT: Log error message
end
CT->>CT: Release write lock (Unlock)
CT->>C: Return result/error
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
@mergify backport v1.8.x |
@mergify backport v1.7.x |
✅ Backports have been created
|
✅ Backports have been created
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Can we trigger a e2e CI run to see if this breaks anything? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Running the regression test https://ci.longhorn.io/job/private/job/longhorn-tests-regression/ |
Which issue(s) this PR fixes:
Issue longhorn/longhorn#6406
What this PR does / why we need it:
Otherwise, there will be a race between unmap and write operations. See the ticket for details
Special notes for your reviewer:
Additional documentation or context