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

Fixes for when getMappedRange cannot parse as tuple #6665

Merged
merged 2 commits into from
Mar 31, 2022

Conversation

nblintao
Copy link
Contributor

@nblintao nblintao commented Mar 23, 2022

  • Throws specific exception instead of a more general error type.

  • Log the violating bytes

  • Make SS not retry/hang on this kind of errors

  • Add and fix tests

Code-Reviewer Section

The general guidelines can be found here.

Please check each of the following things and check all boxes before accepting a PR.

  • The PR has a description, explaining both the problem and the solution.
  • The description mentions which forms of testing were done and the testing seems reasonable.
  • Every function/class/actor that was touched is reasonably well documented.

For Release-Branches

If this PR is made against a release-branch, please also check the following:

  • This change/bugfix is a cherry-pick from the next younger branch (younger release-branch or master if this is the youngest branch)
  • There is a good reason why this PR needs to go into a release branch and this reason is documented (either in the description above or in a linked GitHub issue)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for macOS BigSur 11.5.2

  • CodeBuild project: foundationdb-pr-macos
  • Commit ID: fe0a06e
  • Result: SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

@fdb-windows-ci
Copy link
Collaborator

Doxense CI Report for Windows 10

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: fe0a06e
  • Result: SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

@nblintao nblintao marked this pull request as ready for review March 24, 2022 17:51
@nblintao nblintao requested a review from halfprice March 24, 2022 17:51
@nblintao nblintao marked this pull request as draft March 24, 2022 18:07
@nblintao nblintao marked this pull request as ready for review March 24, 2022 18:21
@@ -178,6 +178,10 @@ ERROR( blob_granule_not_materialized, 2037, "Blob Granule Read was not materiali
ERROR( get_mapped_key_values_has_more, 2038, "getMappedRange does not support continuation for now" )
ERROR( get_mapped_range_reads_your_writes, 2039, "getMappedRange tries to read data that were previously written in the transaction" )
ERROR( checkpoint_not_found, 2040, "Checkpoint not found" )
ERROR( key_not_tuple, 2041, "The key cannot be parsed as a tuple" );
ERROR( value_not_tuple, 2042, "The key cannot be parsed as a tuple" );
Copy link
Collaborator

Choose a reason for hiding this comment

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

The message needs update - it says 'key'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Thanks!

try {
keyTuple = Tuple::unpack(keyValue->key);
} catch (Error& e) {
TraceEvent(SevError, "KeyNotTuple").detail("Key", keyValue->key.printable());
Copy link
Contributor

Choose a reason for hiding this comment

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

Is SevError the right severity? This basically means we are in a very wrong state.

Also, do we want to log the error e here as well?

Copy link
Contributor Author

@nblintao nblintao Mar 30, 2022

Choose a reason for hiding this comment

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

Fixed.

@nblintao nblintao changed the title Log and throw exception when getMappedRange cannot parse as tuple Fixes for when getMappedRange cannot parse as tuple Mar 30, 2022
@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 7f913f6
  • Result: SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

@fdb-windows-ci
Copy link
Collaborator

Doxense CI Report for Windows 10

@nblintao nblintao merged commit 001909b into apple:main Mar 31, 2022
@nblintao nblintao deleted the parse-error-on-map branch March 31, 2022 21:06
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.

5 participants