-
Notifications
You must be signed in to change notification settings - Fork 99
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-1859651 Salt prefix for files mapped from different topics #1035
base: master
Are you sure you want to change the base?
SNOW-1859651 Salt prefix for files mapped from different topics #1035
Conversation
FileNameUtils.filePrefix(conn.getConnectorName(), tableName, topicName, partition); | ||
} else { | ||
this.prefix = FileNameUtils.filePrefix(conn.getConnectorName(), tableName, "", partition); | ||
FileNameUtils.filePrefix(conn.getConnectorName(), tableName, topicForPrefix, partition); |
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.
so, if i read this correctly - we will not generate the salted prefix for all cases but only for a subset of them, right?
why not enable this by default for all?
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.
Correct. There are three benefits I can think of when topic2table.map
is not used for particular topic:
- no chances of regression
- no leftover files just because the connector has been updated
- easier to identify partition numbers
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.
lgtm - left one question though.
Overview
SNOW-1859651
Given two topics that are setup to be ingested to a single table using Snowpipe ingestion, each of the topics has an assigned cleaner for deleting already ingested files. This change prevents these cleaners from incorrectly cleaning files from the topic that should be handled by the other cleaner.
Any topic that is mapped by the
topic2table.map
should have filename prefix salted with the topic as it is otherwise complicated (and unnecessary) to determine which other topic can have a clash on cleaning filenames.Supersedes: #1030
Pre-review checklist
snowflake.snowpipe.stageFileNameExtensionEnabled
.Yes
- Added end to end and Unit Tests.No
- Suggest why it is not param protected