Search in sources :

Example 1 with PrimaryIndexOperationTracker

use of org.apache.asterix.common.context.PrimaryIndexOperationTracker in project asterixdb by apache.

the class LogBuffer method notifyFlushTermination.

public void notifyFlushTermination() throws ACIDException {
    LogRecord logRecord = null;
    try {
        logRecord = (LogRecord) flushQ.take();
    } catch (InterruptedException e) {
    //ignore
    }
    synchronized (logRecord) {
        logRecord.isFlushed(true);
        logRecord.notifyAll();
    }
    PrimaryIndexOperationTracker opTracker = logRecord.getOpTracker();
    if (opTracker != null) {
        try {
            opTracker.triggerScheduleFlush(logRecord);
        } catch (HyracksDataException e) {
            throw new ACIDException(e);
        }
    }
}
Also used : ILogRecord(org.apache.asterix.common.transactions.ILogRecord) LogRecord(org.apache.asterix.common.transactions.LogRecord) PrimaryIndexOperationTracker(org.apache.asterix.common.context.PrimaryIndexOperationTracker) HyracksDataException(org.apache.hyracks.api.exceptions.HyracksDataException) ACIDException(org.apache.asterix.common.exceptions.ACIDException)

Aggregations

PrimaryIndexOperationTracker (org.apache.asterix.common.context.PrimaryIndexOperationTracker)1 ACIDException (org.apache.asterix.common.exceptions.ACIDException)1 ILogRecord (org.apache.asterix.common.transactions.ILogRecord)1 LogRecord (org.apache.asterix.common.transactions.LogRecord)1 HyracksDataException (org.apache.hyracks.api.exceptions.HyracksDataException)1