-
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-1492090 Snowpipe streaming file master key id rotation #786
SNOW-1492090 Snowpipe streaming file master key id rotation #786
Conversation
...ain/java/net/snowflake/ingest/streaming/internal/SnowflakeStreamingIngestClientInternal.java
Outdated
Show resolved
Hide resolved
...ain/java/net/snowflake/ingest/streaming/internal/SnowflakeStreamingIngestClientInternal.java
Outdated
Show resolved
Hide resolved
12d3fff
to
4b00b0a
Compare
7c8f5ed
to
7147d15
Compare
7147d15
to
77e4da5
Compare
42a23ca
to
200034b
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.
Thanks, @sfc-gh-bmikaili , as we discuss IRL, let's keep the old code path around, and only trigger the new code path when the encryption keys array from the server is not-null.
src/main/java/net/snowflake/ingest/streaming/internal/BlobBuilder.java
Outdated
Show resolved
Hide resolved
f74b749
to
34968af
Compare
…pipe-streaming-file-master-key-id-rotation
…pipe-streaming-file-master-key-id-rotation
…pipe-streaming-file-master-key-id-rotation
@sfc-gh-bmikaili to resolve merge conflicts |
…90-snowpipe-streaming-file-master-key-id-rotation
…90-snowpipe-streaming-file-master-key-id-rotation
@sfc-gh-tzhang @sfc-gh-hmadan @sfc-gh-alhuang could you review this PR, please? |
This reverts commit 796fce1.
Long running tests succeeded, with one exception that failed due to flaky unrelated test. |
} | ||
|
||
public String getFullyQualifiedName() { | ||
return String.format("%s.%s.%s", databaseName, schemaName, tableName); |
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.
Could be replace with Utils.getFullyQualifiedTableName(databaseName, schemaName, tableName)
.
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.
Done.
@@ -404,6 +409,17 @@ public SnowflakeStreamingIngestChannelInternal<?> openChannel(OpenChannelRequest | |||
this.storageManager.registerTable( | |||
new TableRef(response.getDBName(), response.getSchemaName(), response.getTableName())); | |||
|
|||
// Add encryption key to the client map for the table | |||
this.encryptionKeysPerTable.put( |
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 might not be necessary? getOrDefault
with the same default value as here is called in BlobBuilder.java
line 90.
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.
Good point, removed.
…90-snowpipe-streaming-file-master-key-id-rotation
This PR implements encryption key refresh from the server. If the register blob endpoint responds with encryption keys as
null
, the encryption key from the open channel response is used. If the register blob endpoint responds with non-empty list of encryption keys, these keys are used for encryption of subsequent BDEC files.