Commit transaction
(self, compact=True, threshold=0.1)
| 491 | self.lock = None |
| 492 | |
| 493 | def commit(self, compact=True, threshold=0.1): |
| 494 | """Commit transaction""" |
| 495 | if self.transaction_doomed: |
| 496 | exception = self.transaction_doomed |
| 497 | self.rollback() |
| 498 | raise exception |
| 499 | self.check_free_space() |
| 500 | segment = self.io.write_commit() |
| 501 | self.segments.setdefault(segment, 0) |
| 502 | self.compact[segment] += LoggedIO.header_fmt.size |
| 503 | if compact: |
| 504 | self.compact_segments(threshold) |
| 505 | self.write_index() |
| 506 | self.rollback() |
| 507 | |
| 508 | def _read_integrity(self, transaction_id, key): |
| 509 | integrity_file = "integrity.%d" % transaction_id |
nothing calls this directly
no test coverage detected