You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "luoluoyuyu (via GitHub)" <gi...@apache.org> on 2025/04/21 03:33:36 UTC
Re: [PR] Pipe: switch to IdentityHashMap backed set to avoid infinite loop in table tsfile builder [iotdb]
luoluoyuyu commented on PR #15371:
URL: https://github.com/apache/iotdb/pull/15371#issuecomment-2817558565
I found that this bug is related to JDK. In fact, this problem will not occur in JDK11, but in JDK8. Great fix, thanks @VGalaxies
JDK 8
```
public final void remove() {
Node<K,V> p = current;
if(p==null)
throw new IllegalStateException();
if (modCount != expectedModCount)
throw new ConcurrentModificationException();
current = null;
K key = p.key;
removeNode(hash(key), key, null, false, false);
expectedModCount = modCount;
}
```
JDK 11
``` public final void remove() {
Node<K,V> p = current;
if(p==null)
throw new IllegalStateException();
if (modCount != expectedModCount)
throw new ConcurrentModificationException();
current = null;
removeNode(p.hash, p.key, null, false, false);
expectedModCount = modCount;
}
```
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org