This is an automated email from the ASF dual-hosted git repository.
xbli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new a1f9b8997c Improve warn logs for requesting validDocID snapshots
(#13280)
a1f9b8997c is described below
commit a1f9b8997ccfca00dbd9d472a300250dd7730e2c
Author: Pratik Tibrewal <[email protected]>
AuthorDate: Fri May 31 21:35:14 2024 +0530
Improve warn logs for requesting validDocID snapshots (#13280)
* Improve warn logs for requesting validDocID snapshots
* Move verbose logs to debug level and keep some aggregated stats in warn
logs
---
.../pinot/server/api/resources/TablesResource.java | 33 ++++++++++++++++------
1 file changed, 25 insertions(+), 8 deletions(-)
diff --git
a/pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java
b/pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java
index f497ad68f4..063608235a 100644
---
a/pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java
+++
b/pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java
@@ -647,6 +647,8 @@ public class TablesResource {
TableDataManager tableDataManager =
ServerResourceUtils.checkGetTableDataManager(_serverInstance,
tableNameWithType);
List<String> missingSegments = new ArrayList<>();
+ int nonImmutableSegmentCount = 0;
+ int missingValidDocIdSnapshotSegmentCount = 0;
List<SegmentDataManager> segmentDataManagers;
if (segments == null) {
segmentDataManagers = tableDataManager.acquireAllSegments();
@@ -668,9 +670,12 @@ public class TablesResource {
}
// Skip the consuming segments
if (!(indexSegment instanceof ImmutableSegmentImpl)) {
- String msg = String.format("Table %s segment %s is not a immutable
segment", tableNameWithType,
- segmentDataManager.getSegmentName());
- LOGGER.warn(msg);
+ if (LOGGER.isDebugEnabled()) {
+ String msg = String.format("Table %s segment %s is not a immutable
segment", tableNameWithType,
+ segmentDataManager.getSegmentName());
+ LOGGER.debug(msg);
+ }
+ nonImmutableSegmentCount++;
continue;
}
@@ -679,11 +684,14 @@ public class TablesResource {
String finalValidDocIdsType =
validDocIdSnapshotPair.getLeft().toString();
MutableRoaringBitmap validDocIdsSnapshot =
validDocIdSnapshotPair.getRight();
if (validDocIdsSnapshot == null) {
- String msg = String.format(
- "Found that validDocIds is missing while processing
validDocIdsMetadata for table %s segment %s while "
- + "reading the validDocIds with validDocIdType %s",
tableNameWithType,
- segmentDataManager.getSegmentName(), validDocIdsType);
- LOGGER.warn(msg);
+ if (LOGGER.isDebugEnabled()) {
+ String msg = String.format(
+ "Found that validDocIds is missing while processing
validDocIdsMetadata for table %s segment %s while "
+ + "reading the validDocIds with validDocIdType %s",
tableNameWithType,
+ segmentDataManager.getSegmentName(), validDocIdsType);
+ LOGGER.debug(msg);
+ }
+ missingValidDocIdSnapshotSegmentCount++;
continue;
}
@@ -699,6 +707,15 @@ public class TablesResource {
validDocIdsMetadata.put("validDocIdsType", finalValidDocIdsType);
allValidDocIdsMetadata.add(validDocIdsMetadata);
}
+ if (nonImmutableSegmentCount > 0) {
+ LOGGER.warn("Table {} has {} non-immutable segments found while
processing validDocIdsMetadata",
+ tableNameWithType, nonImmutableSegmentCount);
+ }
+ if (missingValidDocIdSnapshotSegmentCount > 0) {
+ LOGGER.warn("Found that validDocIds is missing for {} segments while
processing validDocIdsMetadata "
+ + "for table {} while reading the validDocIds with
validDocIdType {}. ",
+ missingValidDocIdSnapshotSegmentCount, tableNameWithType,
validDocIdsType);
+ }
return allValidDocIdsMetadata;
} finally {
for (SegmentDataManager segmentDataManager : segmentDataManagers) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]