marcingorski commented on code in PR #87:
URL: https://github.com/apache/solr-sandbox/pull/87#discussion_r1400397695
##########
crossdc-producer/src/main/java/org/apache/solr/update/processor/MirroringUpdateProcessor.java:
##########
@@ -107,18 +110,24 @@ UpdateRequest createMirrorRequest() {
doc.removeField(CommonParams.VERSION_FIELD); // strip internal doc version
final long estimatedDocSizeInBytes = ObjectSizeEstimator.estimate(doc);
log.info("estimated doc size is {} bytes, max size is {}",
estimatedDocSizeInBytes, maxMirroringDocSizeBytes);
+
producerMirroringMetrics.getDocumentsSize().update(estimatedDocSizeInBytes);
final boolean tooLargeForKafka = estimatedDocSizeInBytes >
maxMirroringDocSizeBytes;
if (tooLargeForKafka && !indexUnmirrorableDocs) {
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Update
exceeds the doc-size limit and is unmirrorable. id="
+ cmd.getPrintableId() + " doc size=" + estimatedDocSizeInBytes + "
maxDocSize=" + maxMirroringDocSizeBytes);
} else if (tooLargeForKafka) {
+ producerMirroringMetrics.getTooLargeDocuments().inc();
Review Comment:
Renamed to `documentTooLarge`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]