Skip to content
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

OAK-10771 - Add disk cache size stats and issue warning if evicted segment has zero length #1427

Merged
merged 3 commits into from
May 22, 2024

Conversation

ahanikel
Copy link
Contributor

The persistent disk cache computes its size internally by adding/subtracting the size of added/purged segments. We would like to be able to see if that computation is correct, by having both the computed size and the effective size on disk in the metrics.

The background for this is that in a few rare instances, the disk cache evicted too many items (down to almost zero) instead of the expected 65% of its max size.

Also we want to make sure that no evictions happen on items that have a length of zero. We're not sure if that happens or not, so the change is to refuse eviction in that case and log a warning instead.

@ahanikel
Copy link
Contributor Author

@smiroslav Could you have another look at this one so we can also have it in the 1.64 release?

@smiroslav smiroslav merged commit 4226ea0 into apache:trunk May 22, 2024
1 of 2 checks passed
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@Version("1.0.0")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a public API?

Copy link
Contributor

Choose a reason for hiding this comment

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

If it's for use inside Oak only, it should be marked "@internal".

shodaaan pushed a commit to shodaaan/jackrabbit-oak that referenced this pull request Jun 17, 2024
…gment has zero length (apache#1427)

* OAK-10771 - Log if evicted segment has length zero.

* OAK-10771 - Add diskCacheSize stats

* OAK-10771 - Record cache size and change

---------

Co-authored-by: Axel Hanikel <ahanikel@adobe.com>
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.

4 participants