-
Notifications
You must be signed in to change notification settings - Fork 3k
Core: Change removal of deprecations to 1.12.0 #14392
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
Conversation
|
|
||
| /** | ||
| * @deprecated will be removed in 2.0.0. Use {@link | ||
| * @deprecated will be removed in 1.12.0. Use {@link |
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 one should be fine to remove before 2.0.0, since the property was only moved to a different class
| /** | ||
| * @deprecated Use {@link SystemConfigs#WORKER_THREAD_POOL_SIZE WORKER_THREAD_POOL_SIZE} instead; | ||
| * will be removed in 2.0.0 | ||
| * will be removed in 1.12.0 |
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 should be ok to remove earlier as well
|
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions. |
|
Limit this to the ones which are trivial, and merge those |
c05ed54 to
398b988
Compare
398b988 to
82673e6
Compare
|
|
||
| /** | ||
| * @deprecated will be removed in 2.0. | ||
| * @deprecated will be removed in 1.12.0. |
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.
CC: @ggershinsky - is there any particular reason to keep these to 2.0?
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.
should be ok to remove earlier.
| * | ||
| * @param props table configuration | ||
| * @deprecated use {@link MetricsConfig#forTable(Table)} | ||
| * @deprecated use {@link MetricsConfig#forTable(Table)}. Will be removed in 1.12.0 |
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.
Change back to 2.0.0
|
|
||
| /** | ||
| * @deprecated since 1.7.0, will be removed in 2.0.0; This method does only best-effort | ||
| * @deprecated since 1.7.0, will be removed in 1.12.0; This method does only best-effort |
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.
What is an alternative way to empty the cache?
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.
@findepi Do you know any alternative way to invalidate all entries in the cache?
@pvary we discussed that we may want to leave the targeted removal for 2.0.0. However, this is a functionality we'd like the users to come off (due to the race condition) I think we should remove asap, so 1.12.0 still makes sense to me. WDYT?
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.
Do you know any alternative way to invalidate all entries in the cache?
Depends on the goal.
if you invalidate just to reduce memory usage (rare), this method is fine
if you invalidate because something changed and all values needs to be recomputed (including those in flight), then there is no ready to use solution.
In trino we have additional layer on top of Guava caches that solves this problem. Here we use caffeine, but last time i checked, it had the same invalidation race problem and the author's feedback was that it was fundamentally not solvable.
thus, if full invalidation is needed, you can either copy code from trino-cache trino module (or use the code i already extracted https://github.com/findepi/evictable-cache)
Here i'd hope that invalidation isn't really needed for anything and we can remove the API.
|
|
||
| /** | ||
| * @deprecated will be removed in 2.0.0, use {@link ViewBuilder#withLocation} instead. | ||
| * @deprecated will be removed in 1.12.0, use {@link ViewBuilder#withLocation} instead. |
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.
set back to 2.0.0
| } | ||
|
|
||
| @Deprecated(since = "1.2") | ||
| /* @deprecated Will be removed in 1.12.0 */ |
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.
check if tests pass without this
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 think we can remove this once the PreparedStatement.setUnicodeStream is removed in JDK. It's out of our control, so I reset this change to original
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 suggest to use @SuppressWarnings("deprecation") to get rid of the warning. Having @Deprecated(since = "1.2") is misleading. One might think that it is referring to the Iceberg 1.2 release
|
|
||
| /** | ||
| * @deprecated will be removed in 2.0.0; use applyNameMapping and pruneColumns(Schema, Set) | ||
| * @deprecated will be removed in 1.12.0; use applyNameMapping and pruneColumns(Schema, Set) |
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.
did the deprecation removal rules change?
it looks like we considered not ok to remove a public API in a minor update, and now we conclude it's ok.
has this been discussed somewhere already?
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.
There was a discussion about this in one of the community syncs. The conclusion was that we give guarantees for a whole major version in the api/ module, however in the core/ module we could be less strict and provide guarantees for one minor release. Technically deprecate in the upcoming minor, drop in the one after that is OK in core. Hence, this PR collects all the deprecations in core/ marking removal for 2.0.0 to revisit them and drop earlier if possible.
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.
however in the core/ module we could be less strict and provide guarantees for one minor release
is this written down somewhere so that we can reference the rules of the games when deprecating?
community syncs meeting notes are not normative, we should capture important conclusions somewhere
btw, i don't think this 1 minor release guarantee means much in practice. maven world reality is that minor version update may just happen when combining various artifacts for the final delivery, so removing an API may obviously lead to MethodDefNotFoundError. This may be a fair trade off, i just hope it's a conscious one
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.
|
|
||
| /** | ||
| * @deprecated since 1.7.0, will be removed in 2.0.0; This method does only best-effort | ||
| * @deprecated since 1.7.0, will be removed in 1.12.0; This method does only best-effort |
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.
Do you know any alternative way to invalidate all entries in the cache?
Depends on the goal.
if you invalidate just to reduce memory usage (rare), this method is fine
if you invalidate because something changed and all values needs to be recomputed (including those in flight), then there is no ready to use solution.
In trino we have additional layer on top of Guava caches that solves this problem. Here we use caffeine, but last time i checked, it had the same invalidation race problem and the author's feedback was that it was fundamentally not solvable.
thus, if full invalidation is needed, you can either copy code from trino-cache trino module (or use the code i already extracted https://github.com/findepi/evictable-cache)
Here i'd hope that invalidation isn't really needed for anything and we can remove the API.
82673e6 to
5bcdeab
Compare
|
Let's wait a bit more if somebody has any more comments |
| * @deprecated Use {@link AuthProperties#AUTH_TYPE}={@link AuthProperties#AUTH_TYPE_SIGV4} | ||
| * instead. Will be removed in 1.12.0. | ||
| */ | ||
| @Deprecated private static final String SIGV4_ENABLED_LEGACY = "rest.sigv4-enabled"; |
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 is actually a fallback mechanism so that older clients still work. When this property is removed, we want to make sure to switch the warn to an error msg but still leave the fallback mechanism in-place
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.
Taking a second look, I just realize this is a private member, so technically this is already deprecated. I'll revert the changes here. because there isn't much we can do atm.
5bcdeab to
fc02d3a
Compare
|
Merged to main. |
No description provided.