adenes commented on a change in pull request #5011:
URL: https://github.com/apache/nifi/pull/5011#discussion_r617007130



##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/schema/inference/InferSchemaAccessStrategy.java
##########
@@ -43,7 +43,7 @@ public InferSchemaAccessStrategy(final RecordSourceFactory<T> 
recordSourceFactor
     public RecordSchema getSchema(final Map<String, String> variables, final 
InputStream contentStream, final RecordSchema readSchema) throws IOException {
         // We expect to be able to mark/reset any length because we expect 
that the underlying stream here will be a ContentClaimInputStream, which is 
able to
         // re-read the content regardless of how much data is read.
-        contentStream.mark(10_000_000);
+        contentStream.mark(Integer.MAX_VALUE);

Review comment:
       I see your point and share your concern.
   Then I'll revert this change and also remove the newly added test case and 
keep only the `BufferedInputStream` wrapping removal.
   I also checked all the other references to 
`org.apache.nifi.serialization.SchemaRegistryService#getSchema()` and no other 
`BufferedInputStream` wrapping occurs, at least not directly before the 
`getSchema()` call.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to