| 1617 | } |
| 1618 | |
| 1619 | Future<Void> commit() override { |
| 1620 | location pushLocation = pushed; |
| 1621 | location popLocation = popped; |
| 1622 | |
| 1623 | Future<Void> commitFuture = queue->commit(); |
| 1624 | |
| 1625 | bool updatePop = popLocation > committed; |
| 1626 | committed = pushLocation; |
| 1627 | |
| 1628 | if (updatePop) { |
| 1629 | ASSERT_WE_THINK(false); |
| 1630 | ASSERT(popLocation <= committed); |
| 1631 | |
| 1632 | queue->stall(); // Don't permit this pipelined commit to write anything to disk until the previous commit is |
| 1633 | // totally finished |
| 1634 | pop(popLocation); |
| 1635 | commitFuture = commitFuture && queue->commit(); |
| 1636 | } else { |
| 1637 | CODE_PROBE(true, "No uncommitted data was popped"); |
| 1638 | } |
| 1639 | |
| 1640 | return commitFuture; |
| 1641 | } |
| 1642 | |
| 1643 | StorageBytes getStorageBytes() const override { return queue->getStorageBytes(); } |
| 1644 | |