Managing ownership in VectorSchemaRoot#addVector, recent changes miss the main fault.

Open
#1,142 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
java
Domain
data

Research direction

Start with VectorSchemaRoot#addVector and read the related discussion in issue #301. Investigate how rearranging FieldVectors affects ownership of their underlying buffers and how VectorSchemaRoots behave when closed. Done means the ownership transfer is handled correctly and closing roots no longer causes the described buffer problems.

Written by the indexing model from the issue text.

Description

Type: bug

A recent change in VectorSchemaRoot#addVector provided a simple improvement, but completely misses a major shortcoming of this routine and, almost certainly, others like it. Based on the interest in that issue (#301), this issue might be of interest to @axreldable and @jbonofre.

One cannot change the FieldVectors belonging to VectorSchemaRoots by simply rearranging the elements of their Lists without considering the ownership of their underlying buffers. This can cause various problems, particularly when VectorSchemaRoots are closed. This is why TransferPair exists.

I would probably need some help with improving this as I'm quite new to using Apache Arrow (and very new to using GitHub). But I have written a possibly improved implementation if this would be of interest and would be open to collaborating on rectifying this bug.

Dominant language
Java
Stars
95
Forks
154
Avg merge
2d 16h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/arrow-java

All issues in apache/arrow-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.