~pbeaman/akiban-persistit/fix-1021734-nightly-deadlock

« back to all changes in this revision

Viewing changes to src/main/java/com/persistit/CheckpointManager.java

  • Committer: build-akiban
  • Date: 2012-08-27 22:52:48 UTC
  • mfrom: (335.3.50 warmup-perf-test)
  • Revision ID: build@akiban.com-20120827225248-4i320bwuffmxtj18
merge pbeaman: This proposal is a re-work of the original buffer pool warm-up code.

https://code.launchpad.net/~pbeaman/akiban-persistit/buffer-pool-warmup-sorted/+merge/121320

Show diffs side-by-side

added added

removed removed

Lines of Context:
201
201
    void pollCreateCheckpoint() throws PersistitException {
202
202
        final long now = System.nanoTime();
203
203
        if (_lastCheckpointNanos + _checkpointIntervalNanos < now) {
 
204
            _persistit.recordBufferPoolInventory();
204
205
            createCheckpoint();
205
206
        }
206
207
    }
252
253
                _currentCheckpoint = new Checkpoint(txn.getStartTimestamp(), System.currentTimeMillis());
253
254
                _outstandingCheckpoints.add(_currentCheckpoint);
254
255
                _persistit.getLogBase().checkpointProposed.log(_currentCheckpoint);
255
 
                return _currentCheckpoint;
256
256
            } catch (final InterruptedException ie) {
257
257
                throw new PersistitInterruptedException(ie);
258
258
            } finally {
259
259
                txn.end();
260
260
            }
 
261
            return _currentCheckpoint;
261
262
        } finally {
262
263
            _persistit.setSessionId(saveSessionId);
263
264
        }