Change upload stream full from warning to error

This commit is contained in:
mcrcortex
2025-04-21 01:56:41 +10:00
parent 0c7421f36c
commit c2e95876d0
2 changed files with 6 additions and 2 deletions

View File

@@ -50,7 +50,7 @@ public class UploadStream {
//Note! we dont commit here, we only try to flush existing memory copies, we dont commit //Note! we dont commit here, we only try to flush existing memory copies, we dont commit
// since commit is an explicit op saying we are done any to push upload everything // since commit is an explicit op saying we are done any to push upload everything
//We dont commit since we dont want to invalidate existing upload pointers //We dont commit since we dont want to invalidate existing upload pointers
Logger.warn("Upload stream full, preemptively committing, this could cause bad things to happen"); Logger.error("Upload stream full, preemptively committing, this could cause bad things to happen");
int attempts = 10; int attempts = 10;
while (--attempts != 0 && this.caddr == SIZE_LIMIT) { while (--attempts != 0 && this.caddr == SIZE_LIMIT) {
glFinish(); glFinish();
@@ -124,6 +124,6 @@ public class UploadStream {
//A upload instance instead of passing one around by reference //A upload instance instead of passing one around by reference
// MUST ONLY BE USED ON THE RENDER THREAD // MUST ONLY BE USED ON THE RENDER THREAD
public static final UploadStream INSTANCE = new UploadStream(1<<25);//32 mb upload buffer public static final UploadStream INSTANCE = new UploadStream(1<<26);//64 mb upload buffer
} }

View File

@@ -69,6 +69,10 @@ public class HierarchicalBitSet {
} }
private void set(int idx) { private void set(int idx) {
//if (this.isSet(idx)) {
// throw new IllegalStateException();
//}
this.endId += idx==(this.endId+1)?1:0; this.endId += idx==(this.endId+1)?1:0;
long dp = this.D[idx>>6] |= 1L<<(idx&0x3f); long dp = this.D[idx>>6] |= 1L<<(idx&0x3f);
if (dp==-1) { if (dp==-1) {