Github user chiastic-security commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/118#discussion_r41040085
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/schema/PMetaDataImpl.java ---
@@ -160,7 +160,7 @@ public PMetaDataCache cloneMinusOverage(long overage) {
newCache.put(tableRef.table.getKey(), new
PTableRef(tableRef));
toRemove.add(tableRef);
toRemoveBytes += tableRef.estSize;
- if (toRemoveBytes - toRemove.peekLast().estSize >
overage) {
+ while (toRemoveBytes - toRemove.peekLast().estSize >=
overage) {
--- End diff --
I did think about that but I don't think it's possible for it to be empty.
If you hit the line for the first time, it's just after you've added something;
if you hit it on a subsequent iteration, it's because you decided to remove
something that left `toRemoveBytes` strictly positive, which means there must
still be something left in the eviction queue.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---