-
Notifications
You must be signed in to change notification settings - Fork 306
HPCC-33988 Allow containerized XRef to delete found file parts #19822
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
Conversation
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-33988 Jirabot Action Result: |
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.
Pull Request Overview
This pull request addresses HPCC-33988 by enhancing the deletion process for found file parts in a containerized XRef environment. Key changes include:
- Adding new properties “NumStripedDevices” and “IsDirPerPart” in the XRef manager.
- Incorporating stripe-aware path building in the DFU XRef file removal logic.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
dali/sasha/saxref.cpp | Sets new properties for striped devices and dir parts |
dali/dfuXRefLib/XRefFilesNode.cpp | Updates file expansion logic to handle stripe numbers and directory-per-part option |
Comments suppressed due to low confidence (1)
dali/dfuXRefLib/XRefFilesNode.cpp:195
- The condition 'if (stripeNum)' will fail to execute if stripeNum equals 0. Verify that a stripe number of 0 is intended to be skipped, or adjust the condition if 0 is a valid stripe value.
if (stripeNum)
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.
@jackdelv - look ok, 1 question
if (isDirPerPart) | ||
addPathSepChar(remoteFile.append(partNum)); | ||
|
||
expandMask(remoteFile, fileMask, partNum-1, numparts); |
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.
not directly related, but the code below is for replicas, which containerized doesn't support.
Can you make it conditional in a separate PR? (and check for similar code that doesn't apply if containerized)
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.
Opened a JIRA for this issue: https://hpccsystems.atlassian.net/browse/HPCC-34117
dali/sasha/saxref.cpp
Outdated
@@ -1411,6 +1411,8 @@ class CNewXRefManager: public CNewXRefManagerBase | |||
branch[drv]->setPropInt64("Size",totsize[drv]); | |||
branch[drv]->setProp("Modified",mostrecent[drv].getString(tmp.clear())); | |||
branch[drv]->setPropInt("Numparts",f->N); | |||
branch[drv]->setPropInt("NumStripedDevices",numStripedDevices); |
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.
rather than add this to every entry, for potential use by CXRefFilesNode::AttachPhysical, can CXRefFilesNode::AttachPhysical lookup numdevices since it knows which 'cluster' it is dealing with?
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.
Yes, added a function for looking up the numDevices from the storage plane.
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.
Currently, this PR is just fixing CXRefFilesNode::RemovePhysical, but this issue does exist in AttachPhysical as well. Should that fix be added in this PR, or in the existing issue open for it?
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.
I think best to keep this PR focus on remove physical, the similar attach physical issues can be fixed in HPCC-33976
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.
@jakesmith I left some responses to your question. Back to you.
if (isDirPerPart) | ||
addPathSepChar(remoteFile.append(partNum)); | ||
|
||
expandMask(remoteFile, fileMask, partNum-1, numparts); |
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.
Opened a JIRA for this issue: https://hpccsystems.atlassian.net/browse/HPCC-34117
dali/sasha/saxref.cpp
Outdated
@@ -1411,6 +1411,8 @@ class CNewXRefManager: public CNewXRefManagerBase | |||
branch[drv]->setPropInt64("Size",totsize[drv]); | |||
branch[drv]->setProp("Modified",mostrecent[drv].getString(tmp.clear())); | |||
branch[drv]->setPropInt("Numparts",f->N); | |||
branch[drv]->setPropInt("NumStripedDevices",numStripedDevices); |
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.
Yes, added a function for looking up the numDevices from the storage plane.
dali/sasha/saxref.cpp
Outdated
@@ -1411,6 +1411,8 @@ class CNewXRefManager: public CNewXRefManagerBase | |||
branch[drv]->setPropInt64("Size",totsize[drv]); | |||
branch[drv]->setProp("Modified",mostrecent[drv].getString(tmp.clear())); | |||
branch[drv]->setPropInt("Numparts",f->N); | |||
branch[drv]->setPropInt("NumStripedDevices",numStripedDevices); |
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.
Currently, this PR is just fixing CXRefFilesNode::RemovePhysical, but this issue does exist in AttachPhysical as well. Should that fix be added in this PR, or in the existing issue open for it?
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.
@jackdelv - looks good, 1 suggestion.
dali/dfuXRefLib/XRefFilesNode.cpp
Outdated
@@ -24,6 +24,23 @@ | |||
#include "jlzw.hpp" | |||
#include "dautils.hpp" | |||
|
|||
|
|||
static unsigned lookupNumStripedDevices(const char *clusterName) |
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.
looks good as a function, I think probably of general use, and should move into dautils.* along with similar functions - perhaps call it "getNumPlaneStripes"
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.
Moved to dautils and renamed to getNumPlaneStripes.
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.
@jackdelv - looks good. Please squash.
Signed-off-by: Jack Del Vecchio <[email protected]>
@jakesmith Squashed. |
11a03cf
into
hpcc-systems:candidate-9.12.x
Jirabot Action Result: |
Type of change:
Checklist:
Smoketest:
Testing: