cgivre commented on code in PR #2889: URL: https://github.com/apache/drill/pull/2889#discussion_r1528802856
########## exec/java-exec/src/main/java/org/apache/drill/exec/cache/VectorAccessibleSerializable.java: ########## @@ -155,12 +157,18 @@ public void readFromStreamWithContainer(VectorContainer myContainer, InputStream for (SerializedField metaData : fieldList) { final int dataLength = metaData.getBufferLength(); final MaterializedField field = MaterializedField.create(metaData); - final DrillBuf buf = allocator.buffer(dataLength); - final ValueVector vector; + DrillBuf buf = null; + ValueVector vector = null; try { + buf = allocator.buffer(dataLength); buf.writeBytes(input, dataLength); vector = TypeHelper.getNewVector(field, allocator); vector.load(metaData, buf); + } catch (OutOfMemoryException oom) { + for (ValueVector valueVector : vectorList) { + valueVector.clear(); + } + throw UserException.memoryError(oom).message("Allocator memory failed").build(logger); Review Comment: Do we know what would cause an error like this? If so what would the user need to do to fix this? -- 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: dev-unsubscr...@drill.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org