|
@@ -291,6 +291,8 @@ func (b *backend) Defrag() error {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (b *backend) defrag() error {
|
|
func (b *backend) defrag() error {
|
|
|
|
|
+ now := time.Now()
|
|
|
|
|
+
|
|
|
// TODO: make this non-blocking?
|
|
// TODO: make this non-blocking?
|
|
|
// lock batchTx to ensure nobody is using previous tx, and then
|
|
// lock batchTx to ensure nobody is using previous tx, and then
|
|
|
// close previous ongoing tx.
|
|
// close previous ongoing tx.
|