Skip to content
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

Open
wants to merge 3 commits into
base: candidate-9.8.x
Choose a base branch
from

Conversation

shamser
Copy link
Contributor

@shamser shamser commented Mar 7, 2024

Type of change:

  • This change is a bug fix (non-breaking change which fixes an issue).
  • This change is a new feature (non-breaking change which adds functionality).
  • This change improves the code (refactor or other change that does not change the functionality)
  • This change fixes warnings (the fix does not alter the functionality or the generated code)
  • This change is a breaking change (fix or feature that will cause existing behavior to change).
  • This change alters the query API (existing queries will have to be recompiled)

Checklist:

  • My code follows the code style of this project.
    • My code does not create any new warnings from compiler, build system, or lint.
  • The commit message is properly formatted and free of typos.
    • The commit message title makes sense in a changelog, by itself.
    • The commit is signed.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly, or...
    • I have created a JIRA ticket to update the documentation.
    • Any new interfaces or exported functions are appropriately commented.
  • I have read the CONTRIBUTORS document.
  • The change has been fully tested:
    • I have added tests to cover my changes.
    • All new and existing tests passed.
    • I have checked that this change does not introduce memory leaks.
    • I have used Valgrind or similar tools to check for potential issues.
  • I have given due consideration to all of the following potential concerns:
    • Scalability
    • Performance
    • Security
    • Thread-safety
    • Cloud-compatibility
    • Premature optimization
    • Existing deployed queries will not be broken
    • This change fixes the problem, not just the symptom
    • The target branch of this pull request is appropriate for such a change.
  • There are no similar instances of the same problem that should be addressed
    • I have addressed them here
    • I have raised JIRA issues to address them separately
  • This is a user interface / front-end modification
    • I have tested my changes in multiple modern browsers
    • The component(s) render as expected

Smoketest:

  • Send notifications about my Pull Request position in Smoketest queue.
  • Test my draft Pull Request.

Testing:

@shamser shamser requested a review from jakesmith March 7, 2024 13:13
Copy link

github-actions bot commented Mar 7, 2024


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));
Copy link
Member

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.

Copy link
Member

@jakesmith jakesmith left a 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.

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),
Copy link
Member

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'

@jakesmith
Copy link
Member

Not a high priority, but just noticed this seems to have stalled.
@shamser

@shamser shamser changed the base branch from candidate-9.4.x to candidate-9.8.x October 2, 2024 15:10
@shamser shamser force-pushed the issue31410 branch 2 times, most recently from f74a525 to 7227950 Compare October 2, 2024 15:12
@shamser shamser requested a review from jakesmith October 2, 2024 15:12
Copy link
Member

@jakesmith jakesmith left a 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.

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),
Copy link
Member

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.

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'),
Copy link
Member

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'.

STRING20 user;
END;

layout_names := RECORD
Copy link
Member

Choose a reason for hiding this comment

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

unused

//noroxie
//nohthor

import Std.System;
Copy link
Member

Choose a reason for hiding this comment

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

unused

Signed-off-by: Shamser Ahmed <shamser.ahmed@lexisnexis.com>
Signed-off-by: Shamser Ahmed <shamser.ahmed@lexisnexis.com>
Signed-off-by: Shamser Ahmed <shamser.ahmed@lexisnexis.com>
@shamser shamser changed the title HPCC-31410 DFU Copy regression test HPCC-31410 DFU superfile copy test Oct 4, 2024
@shamser shamser requested a review from jakesmith October 4, 2024 10:07
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),
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

@jakesmith jakesmith left a 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

@jakesmith jakesmith self-requested a review October 10, 2024 12:34
@jakesmith
Copy link
Member

@shamser - tagged myself for review - to remind myself to look at this.

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.

2 participants