Kris-10-0 edited a comment on pull request #7519:
URL: https://github.com/apache/geode/pull/7519#issuecomment-1083713236
Can you also fix the sizing for LINSERT. It calls elementInsert(byte[]
elementToInsert, byte[] referenceElement,
boolean before) in RedisList, but the size is not updated. That method
could be moved to SizeableByteArrayList and it should look like this. A test
would also need to be added I believe.
```
public int elementInsert(byte[] elementToInsert, byte[] referenceElement,
boolean before) {
int i = 0;
ListIterator<byte[]> iterator = listIterator();
while (iterator.hasNext()) {
if (Arrays.equals(iterator.next(), referenceElement)) {
memberOverhead += calculateByteArrayOverhead(elementToInsert);
if (before) {
iterator.previous();
iterator.add(elementToInsert);
return i;
} else {
iterator.add(elementToInsert);
return i + 1;
}
}
i++;
}
return -1;
}
```
--
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]