You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/07/28 17:58:06 UTC
[GitHub] [druid] maytasm opened a new pull request #11510: compaction/status API retains status for datasources that no longer existed causing in-memory used to grow unbounded
maytasm opened a new pull request #11510:
URL: https://github.com/apache/druid/pull/11510
compaction/status API retains status for datasources that no longer existed causing in-memory used to grow unbounded
### Description
This change removes any datasource that does not have any segments even if it has an enabled auto compaction config from the compaction/status API. This means that the compaction/status API will now only return datasource that has auto compaction config enabled and has active segment in the latest auto compaction run only.
This PR has:
- [x] been self-reviewed.
- [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
- [ ] added documentation for new or modified features or behaviors.
- [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
- [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
- [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
- [x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
- [ ] added integration tests.
- [x] been tested in a test Druid cluster.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] rohangarg commented on a change in pull request #11510: compaction/status API retains status for datasources that no longer existed causing in-memory used to grow unbounded
Posted by GitBox <gi...@apache.org>.
rohangarg commented on a change in pull request #11510:
URL: https://github.com/apache/druid/pull/11510#discussion_r678883157
##########
File path: server/src/main/java/org/apache/druid/server/coordinator/duty/CompactSegments.java
##########
@@ -444,26 +431,35 @@ private CoordinatorStats makeStats(
// Statistics of all segments considered compacted after this run
Map<String, CompactionStatistics> allCompactedStatistics = iterator.totalCompactedStatistics();
+ for (Map.Entry<String, CompactionStatistics> compactionStatisticsEntry : allCompactedStatistics.entrySet()) {
+ final String dataSource = compactionStatisticsEntry.getKey();
+ final CompactionStatistics dataSourceCompactedStatistics = compactionStatisticsEntry.getValue();
+ AutoCompactionSnapshot.Builder builder = currentRunAutoCompactionSnapshotBuilders.computeIfAbsent(
+ dataSource,
+ k -> new AutoCompactionSnapshot.Builder(k, AutoCompactionSnapshot.AutoCompactionScheduleStatus.RUNNING)
+ );
+ builder.incrementBytesCompacted(dataSourceCompactedStatistics.getByteSum());
+ builder.incrementSegmentCountCompacted(dataSourceCompactedStatistics.getSegmentNumberCountSum());
+ builder.incrementIntervalCountCompacted(dataSourceCompactedStatistics.getSegmentIntervalCountSum());
+ }
+
// Statistics of all segments considered skipped after this run
Map<String, CompactionStatistics> allSkippedStatistics = iterator.totalSkippedStatistics();
+ for (Map.Entry<String, CompactionStatistics> compactionStatisticsEntry : allSkippedStatistics.entrySet()) {
+ final String dataSource = compactionStatisticsEntry.getKey();
+ final CompactionStatistics dataSourceCompactedStatistics = compactionStatisticsEntry.getValue();
Review comment:
this should probably be `dataSourceSkippedStatistics`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] maytasm merged pull request #11510: compaction/status API retains status for datasources that no longer existed causing in-memory used to grow unbounded
Posted by GitBox <gi...@apache.org>.
maytasm merged pull request #11510:
URL: https://github.com/apache/druid/pull/11510
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on pull request #11510: compaction/status API retains status for datasources that no longer existed causing in-memory used to grow unbounded
Posted by GitBox <gi...@apache.org>.
kfaraz commented on pull request #11510:
URL: https://github.com/apache/druid/pull/11510#issuecomment-888831836
LGTM
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org