viirya commented on code in PR #40043:
URL: https://github.com/apache/arrow/pull/40043#discussion_r1488795446
##########
java/vector/src/main/java/org/apache/arrow/vector/BaseVariableWidthVector.java:
##########
@@ -476,11 +507,12 @@ private void allocateBytes(final long valueBufferSize,
final int valueCount) {
}
/* allocate offset buffer */
- private void allocateOffsetBuffer(final long size) {
+ private ArrowBuf allocateOffsetBuffer(final long size) {
Review Comment:
>> Hmm, don't you see my latest commit? It doesn't increase ref count when
exporting.
>> Or I miss anything?
> This is making the problem worse for all non-offset buffers (which now get
an extra refcount) while not changing it for the offset buffer (because, again,
please see the sequence of events that I keep outlining above...)
I know what you meant, and I guess you don't see committed code but only the
comment, so there is confusion.
In latest commit, I don't increase ref count when exporting offset buffer if
it is newly allocated (so its ref count is 1 that counts for imported usage
instead of 2 which you mentioned before). For non-offset buffers, of course
their refcounts are increased as before.
--
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]