gerlowskija commented on code in PR #1040: URL: https://github.com/apache/solr/pull/1040#discussion_r980316083
########## solr/core/src/java/org/apache/solr/update/processor/IgnoreLargeDocumentProcessorFactory.java: ########## @@ -59,15 +71,25 @@ public void init(NamedList<?> args) { public UpdateRequestProcessor getInstance( SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) { return new UpdateRequestProcessor(next) { + @Override public void processAdd(AddUpdateCommand cmd) throws IOException { long docSize = ObjectSizeEstimator.estimate(cmd.getSolrInputDocument()); if (docSize / 1024 > maxDocumentSize) { + handleViolatingDoc(cmd, docSize); + } else { + super.processAdd(cmd); + } + } + + private void handleViolatingDoc(AddUpdateCommand cmd, long estimatedSizeBytes) { + if (onlyLogErrors) { + log.warn("Skipping doc {} bc size {} exceeds limit {}", cmd.getPrintableId(), estimatedSizeBytes / 1024, maxDocumentSize); Review Comment: Good call; I've updated the var names and log message to make this clearer. -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org