use of io.questdb.std.str.LPSZ in project questdb by bluestreak01.
the class O3FailureTest method testColumnTopMidMergeBlankFailRetryOpenRw2.
@Test
public void testColumnTopMidMergeBlankFailRetryOpenRw2() throws Exception {
counter.set(3);
executeWithoutPool(O3FailureTest::testColumnTopMidMergeBlankColumnFailRetry0, new FilesFacadeImpl() {
@Override
public long openRW(LPSZ name) {
if (Chars.endsWith(name, "1970-01-06" + Files.SEPARATOR + "b.d") && counter.decrementAndGet() == 0) {
return -1;
}
return super.openRW(name);
}
});
}
use of io.questdb.std.str.LPSZ in project questdb by bluestreak01.
the class O3FailureTest method testPartitionedDataAppendOOPrependOODataMapVar.
@Test
public void testPartitionedDataAppendOOPrependOODataMapVar() throws Exception {
counter.set(3);
executeWithoutPool(O3FailureTest::testPartitionedDataAppendOOPrependOODataFailRetry0, new FilesFacadeImpl() {
private long theFd = 0;
@Override
public long mmap(long fd, long len, long offset, int flags, int memoryTag) {
if (theFd == fd) {
theFd = 0;
return -1;
}
return super.mmap(fd, len, offset, flags, memoryTag);
}
@Override
public long openRW(LPSZ name) {
long fd = super.openRW(name);
if (Chars.endsWith(name, "1970-01-06" + Files.SEPARATOR + "m.d") && counter.decrementAndGet() == 0) {
theFd = fd;
}
return fd;
}
});
}
use of io.questdb.std.str.LPSZ in project questdb by bluestreak01.
the class O3FailureTest method testPartitionedDataAppendOODataIndexedContended.
@Test
public void testPartitionedDataAppendOODataIndexedContended() throws Exception {
counter.set(3);
executeWithPool(0, O3FailureTest::testPartitionedDataAppendOODataIndexedFailRetry0, new FilesFacadeImpl() {
@Override
public long openRW(LPSZ name) {
if (Chars.endsWith(name, "1970-01-06" + Files.SEPARATOR + "timestamp.d") && counter.decrementAndGet() == 0) {
return -1;
}
return super.openRW(name);
}
});
}
use of io.questdb.std.str.LPSZ in project questdb by bluestreak01.
the class O3FailureTest method testColumnTopMidAppendContended.
@Test
public void testColumnTopMidAppendContended() throws Exception {
counter.set(3);
executeWithPool(0, O3FailureTest::testColumnTopMidAppendColumnFailRetry0, new FilesFacadeImpl() {
@Override
public long openRW(LPSZ name) {
if (Chars.endsWith(name, "1970-01-07" + Files.SEPARATOR + "v12.d") && counter.decrementAndGet() == 0) {
return -1;
}
return super.openRW(name);
}
});
}
use of io.questdb.std.str.LPSZ in project questdb by bluestreak01.
the class O3FailureTest method testColumnTopMidDataMergeDataFailRetryReadTop.
@Test
public void testColumnTopMidDataMergeDataFailRetryReadTop() throws Exception {
counter.set(2);
executeWithoutPool((compiler, sqlExecutionContext, sqlExecutionContext2) -> testColumnTopMidDataMergeDataFailRetry0(sqlExecutionContext, sqlExecutionContext2), new FilesFacadeImpl() {
long theFd;
@Override
public long openRO(LPSZ name) {
long fd = super.openRO(name);
if (Chars.endsWith(name, "1970-01-07" + Files.SEPARATOR + "v2.top")) {
if (counter.decrementAndGet() == 0) {
theFd = fd;
}
}
return fd;
}
@Override
public long read(long fd, long address, long len, long offset) {
if (fd == theFd) {
theFd = 0;
return 5;
}
return super.read(fd, address, len, offset);
}
});
}
Aggregations