Skip to content

Mark TabletStatistics.getSplitCreationTime as deprecated#3977

Merged
dlmarion merged 2 commits intoapache:mainfrom
dlmarion:deprecate-getSplitCreationTime
Nov 27, 2023
Merged

Mark TabletStatistics.getSplitCreationTime as deprecated#3977
dlmarion merged 2 commits intoapache:mainfrom
dlmarion:deprecate-getSplitCreationTime

Conversation

@dlmarion
Copy link
Copy Markdown
Contributor

No description provided.

@dlmarion dlmarion self-assigned this Nov 22, 2023
@dlmarion
Copy link
Copy Markdown
Contributor Author

#3959 removed TabletStatistics.getCreationTime in the elasticity branch.

@dlmarion dlmarion merged commit e12e033 into apache:main Nov 27, 2023
@dlmarion dlmarion deleted the deprecate-getSplitCreationTime branch November 27, 2023 13:25
}

@Override
@SuppressWarnings("removal")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why was this warnings suppression added here? I don't think this is correct. You don't need to suppress the warning in the subclass for the deprecation in the interface. However, it may be necessary to mark the implementation as also deprecated, in case it's used directly instead of only via the interface.

ctubbsii added a commit to ctubbsii/accumulo that referenced this pull request Dec 5, 2023
Rewrite MemoryConsumingIterator's method to compute the amount of memory
to consume, so that:

* The implementation is more comprehensible
* Replace exception with bounds checking
* Avoid allocating more than necessary (a single byte is sufficient)
* The log message includes the amount of used memory detected
* The waiting message appears, even when memory was detected, because
  that's the behavior
* Give the GC more time to detect the changed GC condition before trying
  to detect the low memory condition

Also, remove hard-coded comments for size of heap and incorrect interval
frequency, and increase the configured free memory threshold, so that
the memory percentage isn't so low, it doesn't get lower than the
minimum that G1GC needs to do its job by default on a 256K VM.

This fixes apache#3868

Also include trivial fixes:

* Fix deprecation warning issues for getSplitCreationTime by making impl
  class deprecated instead of suppressing the interface deprecation, and
  use regular deprecations, not forRemoval=true, which complicates the
  way deprecations get inherited (see comments on apache#3977)
* Remove unused Logger
@ctubbsii ctubbsii mentioned this pull request Dec 5, 2023
@ctubbsii
Copy link
Copy Markdown
Member

ctubbsii commented Dec 6, 2023

I suggested changes to the way it's marked as deprecated in #4024 as a trivial change in conjunction with the main point of that PR. I can separate it out if needed.

@dlmarion
Copy link
Copy Markdown
Contributor Author

dlmarion commented Dec 6, 2023

I keep getting conflicting advice on whether to use the 'forRemoval' attribute. As you can see from the comments above, I didn't use it at first, then it was suggested that I add it. I do agree it seems redundant, but it must exist for some reason. Personally, I don't care whether we use it or not. Maybe we can decide at a project level?

@ctubbsii
Copy link
Copy Markdown
Member

ctubbsii commented Dec 6, 2023

I keep getting conflicting advice on whether to use the 'forRemoval' attribute.

I'm not sure who is in favor of it, but I imagine whoever is, it's because it's helpful to be explicit. I suspect Java added it because so many people mark things deprecated and then they stayed deprecated forever in some Java libraries. But that's not really necessary in a world where semantic versioning is used and major releases are expected for breaking changes. I have personally avoided it because of the problems that it causes but I haven't really objected to using it in principal. Any objections that I might have her purely practical.

Maybe we can decide at a project level?

The options would be to use it everywhere, use it nowhere, not care if it's used or not, or develop some criteria by which we decide when it should be used and when it shouldn't. Since semantic versioning drives us, I don't really think that last option is useful. The third option can lead to confusion. But I think for practical reasons using it everywhere isn't really viable. So that really only leaves use it nowhere. But we can discuss and decide on the mailing list.

@dlmarion
Copy link
Copy Markdown
Contributor Author

dlmarion commented Dec 6, 2023

I suggested changes to the way it's marked as deprecated in #4024 as a trivial change in conjunction with the main point of that PR. I can separate it out if needed.

There are other Deprecated annotations in Propery.java using the forRemoval annotation in main at this point. It might make sense to remove these changes from #4024 and change them all in one PR. Maybe that's the appropriate place to have that conversation.

@ctubbsii ctubbsii added this to the 3.1.0 milestone Jul 12, 2024
@ctubbsii ctubbsii modified the milestones: 3.1.0, 4.0.0 Mar 14, 2025
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.

3 participants