linkedin / linkedin/ambry

BlobStoreStats returns valid log segment size map in the wrong order

Open
#713 1 comment 0 reactions 1 assignee View on GitHub

@nsivabalan is already working on this.

Since Aug 3, 2017.

bug
Dominant language
Java
Stars
1.8k
Forks
298
Avg merge
21h 43m
Merged PRs (30d)
9

Description

`BlobStoreStats` has a function to get size by log segment. The return type is a `NavigableMap` but the sort order in the map is incorrect. This causes `DefaultCompactionPolicy` to pick the wrong segments.

The sort order needs to be fixed by using `LogSegmentNameHelper.COMPARATOR`

For example, segments with names `1_0`, `2_0` and `10_0` should be sorted in that order but the returned `Map` has them in natural `String` sort order i.e. `1_0`, `10_0` `2_0`

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.