-
Notifications
You must be signed in to change notification settings - Fork 57
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
SNOW-928922 send spansMixedTables flag in blob registration requests #651
SNOW-928922 send spansMixedTables flag in blob registration requests #651
Conversation
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.
Left some comments, otherwise LGTM! And I assume the server side change is now rollback safe?
ParameterProvider.BLOB_FORMAT_VERSION_DEFAULT, | ||
chunks, | ||
blobStats, | ||
chunks == null ? false : chunks.size() > 1); |
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.
can chunks
be null here?
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, because that constructor is used in tests (only) and RegisterServiceTest
calls it with chunks null
.
@@ -18,24 +18,33 @@ class BlobMetadata { | |||
private final Constants.BdecVersion bdecVersion; | |||
private final List<ChunkMetadata> chunks; | |||
private final BlobStats blobStats; | |||
private final boolean spansMixedTables; |
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.
want to add a comment explain this? The name is not straight forward like other fields
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.
Or I suggest we call it something like hasMultipleTables
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 added a comment.
@@ -568,8 +568,15 @@ BlobMetadata upload( | |||
blob.length, | |||
System.currentTimeMillis() - startTime); | |||
|
|||
// at this point we know for sure if the BDEC file has data for more than one chunk, i.e. |
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.
nit
// at this point we know for sure if the BDEC file has data for more than one chunk, i.e. | |
// At this point we know for sure if the BDEC file has data for more than one chunk, i.e. |
Yeah, it will work with old SDKs. The default value server-side if the flag is missing is true. |
9b53126
to
31612e9
Compare
This PR add a new field
spansMixedTables
in BlobMetadata, which is send in the blob registration request.This flag will be used server-side for optimizations and sanity checks.
After this PR, we want to simplify the retry logic so that the new register blob request has all chunks contained in a blob and attempted previously, not just failed chunks.
Both of these will serve the same goal to have correct flag value server-side. The flag is there in case there is something wrong with retries or we have to revert back to old retry logic.
I'll wait for the server-side change to be deployed before merging this PR.