JanusGraph / JanusGraph/janusgraph
It could be ConcurrentModificationException...
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
```
//SimpleBufferAddedRelations
private void cleanup() {
if(this.deleted != null && !this.deleted.isEmpty()) {
Set deletedSet = new HashSet(this.deleted);
this.deleted = null;
List newadded = new ArrayList(this.added.size() - deletedSet.size() / 2);
Iterator var3 = this.added.iterator();
while(var3.hasNext()) {// I think there will be exceptions.
InternalRelation r = (InternalRelation)var3.next();
if(!deletedSet.contains(r)) {
newadded.add(r);
}
}
this.added = newadded;
}
}
```
I used the parallelStream operation data. SimpleBufferAddedRelations will throw ConcurrentModificationException.I think it should be used CopyOnWriteArrayList
Contributor guide
Research direction
Locate SimpleBufferAddedRelations and inspect cleanup(), then reproduce the reported ConcurrentModificationException through parallelStream use. Determine the concurrency behavior around deleted and added, and add a regression test that demonstrates the failure and verifies the completed fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100