MCPcopy Index your code
hub / github.com/borgbackup/borg / commit

Method commit

src/borg/legacyrepository.py:493–506  ·  view source on GitHub ↗

Commit transaction

(self, compact=True, threshold=0.1)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

rollbackMethod · 0.95
check_free_spaceMethod · 0.95
compact_segmentsMethod · 0.95
write_indexMethod · 0.95
write_commitMethod · 0.80

Tested by

no test coverage detected