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

[dvc][compat] Add blob transfer support for DaVinciRecordTransformer #1471

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

kvargha
Copy link
Contributor

@kvargha kvargha commented Jan 24, 2025

[dvc][compat] Add blob transfer support for DaVinciRecordTransformer

This PR makes DVRT compatible with blob transfer. Here are the changes made:

  1. Throw an exception when database checksum verification is enabled. This is because DVRT transforms the values, and when the transformed checksum is compared with the expected checksum the validation will fail. Due to the nature of this feature, it makes sense to not support it and checksum verification is off by default anyway for DVC.
  2. Store the classHash in the offsetRecord so it can be transported during blob transfer. This is to ensure that the blob that was transferred is compatible with the current transformer logic.
  3. Removed file based classHash persistence as it is now stored in the offsetRecord.
  4. Fixed a bug in SIT where the classHash was being calculated based on the wrapper class not the user's class.

How was this PR tested?

Add unit and integration tests.

Does this PR introduce any user-facing changes?

  • No. You can skip the rest of this section.
  • Yes. Make sure to explain your proposed changes and call out the behavior change.

DVRT is no longer compatible with database checksum verification, but this is fine since DVRT is not currently being used.

Copy link
Contributor

@sixpluszero sixpluszero left a comment

Choose a reason for hiding this comment

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

I have not done the pass on the actual logic yet but I just leave a few general comments. We should consider fixing these protocol changes as well.

@@ -23,5 +23,3 @@ _site/
Gemfile.lock
.bundles_cache
docs/vendor/
clients/da-vinci-client/classHash*.txt
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we remove this? classHash should not be included.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file will no longer get generated as the classHash is now stored in the offset record.

@kvargha kvargha changed the title [dvc] Add blob transfer support for DaVinciRecordTransformer [dvc][compat] Add blob transfer support for DaVinciRecordTransformer Jan 24, 2025
String snapshotPath = RocksDBUtils.composeSnapshotDir(dvcPath1 + "/rocksdb", storeName + "_v1", i);
Assert.assertTrue(Files.exists(Paths.get(snapshotPath)));
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to verify that the RecordTransformerClassHash info in the offset record is correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will be difficult to do that in an integration test as I don't see a good way to access the storageEngine to fetch the offsetRecord. But I did add an extremely trivial validation in a unit test.

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.

3 participants