// --------------------------------------------------------------------------------------------
// UTILITY METHODS
// --------------------------------------------------------------------------------------------
private void updateTracking(AbstractTransaction ts, Table catalog_tbl, boolean isRead, int...tupleIds) {
VoltTable vts[] = this.readWriteSets.get(ts);
if (vts == null) {
vts = new VoltTable[]{
new VoltTable(TestReadWriteTracking.RESULT_COLS),
new VoltTable(TestReadWriteTracking.RESULT_COLS)
};
this.readWriteSets.put(ts, vts);
}
VoltTable vt = null;
if (isRead) {
vt = vts[OptimisticConflictChecker.READ];
ts.markTableRead(BASE_PARTITION, catalog_tbl);
}
else {
vt = vts[OptimisticConflictChecker.WRITE];
ts.markTableWritten(BASE_PARTITION, catalog_tbl);
}
for (int tupleId : tupleIds) {
vt.addRow(catalog_tbl.getName(), tupleId);
} // FOR
}