-
Notifications
You must be signed in to change notification settings - Fork 304
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
HPCC-31410 DFU superfile copy test #18382
base: candidate-9.8.x
Are you sure you want to change the base?
Conversation
https://track.hpccsystems.com/browse/HPCC-31410 |
testing/regress/ecl/dfucopy.ecl
Outdated
|
||
d1 := DISTRIBUTE(NORMALIZE(v1, 1000, addCount(LEFT, COUNTER)), HASH32(id)); | ||
d2 := DISTRIBUTE(NORMALIZE(v2, 1000, addCount(LEFT, COUNTER)), HASH32(id)); | ||
d3 := DISTRIBUTE(NORMALIZE(v3, 1000, addCount(LEFT, COUNTER)), HASH32(id)); |
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.
let's simply the test, it doesn't need JOIN's and DISTRIBUTE's (which are well tested elsewhere) in it afaics, to test copy copying a superfile ?
You can use ", DISTRIBUTED" on the inline datasets to ensure they are spread over parts.
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.
@shamser - see comment re. simplifying the test so only/specifically testing a file copy.
Also the JIRA and commit message, don't make it clear this is to adding a test specifically to test super file copies.
testing/regress/ecl/dfucopy.ecl
Outdated
FileServices.AddSuperFile(prefix + 'superdata',prefix + 'subdata2'), | ||
FileServices.AddSuperFile(prefix + 'superdata',prefix + 'subdata3'), | ||
FileServices.FinishSuperFileTransaction(), | ||
FileServices.Copy(sourceLogicalName := prefix + 'superdata', destinationGroup:= 'mythor', destinationLogicalName := prefix + 'super_copy', ALLOWOVERWRITE := true), |
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.
trivial: missing space after 'destinationGroup'
Not a high priority, but just noticed this seems to have stalled. |
f74a525
to
7227950
Compare
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.
@shamser - there are some pre-existing copy tests in filecompcopy, but those are specifically for testing copying compressed logical files.
This test is specifically for testing copying a superfile?
If so, I think it would be better to rename to dfusupercopy.ecl for clarity.
Also, can you add a description to the JIRA.
testing/regress/ecl/dfucopy.ecl
Outdated
FileServices.AddSuperFile(prefix + 'superdata', prefix + 'subdata2'), | ||
FileServices.AddSuperFile(prefix + 'superdata', prefix + 'subdata3'), | ||
FileServices.FinishSuperFileTransaction(), | ||
FileServices.Copy(sourceLogicalName := prefix + 'superdata', destinationGroup := 'mythor', destinationLogicalName := prefix + 'super_copy', ALLOWOVERWRITE := true), |
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.
would be more portable if didn't explicitly specify destinationGroup. It will use the source file's by default.
testing/regress/ecl/dfucopy.ecl
Outdated
FileServices.FinishSuperFileTransaction(), | ||
FileServices.Copy(sourceLogicalName := prefix + 'superdata', destinationGroup := 'mythor', destinationLogicalName := prefix + 'super_copy', ALLOWOVERWRITE := true), | ||
FileServices.DeleteLogicalFile(prefix + 'super_copy', true), | ||
FileServices.DeleteOwnedSubFiles(prefix + 'superdata'), |
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 really necessary, if you reorder the lines below, and 1st delete the prefix + 'superdata'.
testing/regress/ecl/dfucopy.ecl
Outdated
STRING20 user; | ||
END; | ||
|
||
layout_names := RECORD |
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.
unused
testing/regress/ecl/dfucopy.ecl
Outdated
//noroxie | ||
//nohthor | ||
|
||
import Std.System; |
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.
unused
testing/regress/ecl/dfusupercopy.ecl
Outdated
FileServices.AddSuperFile(prefix + 'superdata', prefix + 'subdata2'), | ||
FileServices.AddSuperFile(prefix + 'superdata', prefix + 'subdata3'), | ||
FileServices.FinishSuperFileTransaction(), | ||
FileServices.Copy(sourceLogicalName := prefix + 'superdata', destinationGroup := Thorlib.group(), destinationLogicalName := prefix + 'super_copy', ALLOWOVERWRITE := true), |
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.
destinationGroup := Thorlib.group()
is there any reason to define this at all?
thorlib.group() in k8s doesn't make sense - destinationPlane should be used..
But, neither needs to be defined afaics, defaults would be good.
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.
If the destinationPlane is not defined, an error is reported and it fails to compile. @jakesmith
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.
ok, it happens to work (in k8s) because Thorlib.group() makes no sense in k8s context, so it returns "". That in turn is treated by File.Copy to mean none provided, which then make it default to use the plane/group of the source file being copied.
So passing "" would be more correct here. Can you change to that and check it works?
Assuming it does, it would be sensible to allow this parameter to be optional, omit it, and let it perform the default behaviour if not supplied - which is what we want here.
However, file service calls like this (e.g. Spray too) should really be able to explicitly use a destinationPlane.
I've opened a separate JIRA: https://hpccsystems.atlassian.net/browse/HPCC-32844
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.
@shamser - 1 follow on comment
@shamser - tagged myself for review - to remind myself to look at this. |
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.
@shamser - please see my last comment.
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.
@shamser - looks good. Please squash.
FileServices.AddSuperFile(prefix + 'superdata', prefix + 'subdata3'), | ||
FileServices.FinishSuperFileTransaction(), | ||
FileServices.Copy(sourceLogicalName := prefix + 'superdata', destinationGroup := '', destinationLogicalName := prefix + 'super_copy', ALLOWOVERWRITE := true), | ||
FileServices.DeleteLogicalFile(prefix + 'super_copy', true), |
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.
Should this have code to check that contents of superdata and super_copy match the original?
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.
This has added a check that the source is what we expect, it hasn't checked the target is the same.
When checking the target it should check that the records are in an identical order. (Possibly use COMBINE to efficiently implement that.)
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.
@shamser please squash. This was stuck because it was tagged as a draft request - so it wasn't appearing on any of my lists.
@shamser - this still needs squashing |
Signed-off-by: Shamser Ahmed <[email protected]>
Type of change:
Checklist:
Smoketest:
Testing: