4747#include " task/task_code.h"
4848#include " task/task_tracker.h"
4949#include " utils/autoref_ptr.h"
50+ #include " utils/ports.h"
5051#include " utils/error_code.h"
5152#include " utils/errors.h"
5253#include " utils/zlocks.h"
@@ -404,7 +405,10 @@ class mutation_log : public ref_counter
404405 // be less than _plog_max_decree_on_disk.
405406 decree _plog_max_commit_on_disk;
406407
407- decree _cleanable_decree; // for gc crush
408+ // The decree threshold for private log garbage collection. Mutations with decree <= this
409+ // value are considered cleanable and their log files may be deleted by GC.
410+ // Protected by _lock in get/set.
411+ decree _cleanable_decree;
408412};
409413
410414using mutation_log_ptr = dsn::ref_ptr<mutation_log>;
@@ -425,18 +429,12 @@ class mutation_log_private : public mutation_log, private replica_base
425429 _tracker.cancel_outstanding_tasks ();
426430 }
427431
428- // Non-copyable and non-movable
429- mutation_log_private (const mutation_log_private &) = delete ;
430- mutation_log_private &operator =(const mutation_log_private &) = delete ;
431- mutation_log_private (mutation_log_private &&) = delete ;
432- mutation_log_private &operator =(mutation_log_private &&) = delete ;
433-
434432 ::dsn::task_ptr append (mutation_ptr &mu,
435433 dsn::task_code callback_code,
436434 dsn::task_tracker *tracker,
437435 aio_handler &&callback,
438- int hash,
439- int64_t *pending_size) override ;
436+ int hash = 0 ,
437+ int64_t *pending_size = nullptr ) override ;
440438
441439 bool get_learn_state_in_memory (decree start_decree, binary_writer &writer) const override ;
442440
@@ -449,6 +447,9 @@ class mutation_log_private : public mutation_log, private replica_base
449447 void flush_once () override ;
450448
451449private:
450+ DISALLOW_COPY_AND_ASSIGN (mutation_log_private);
451+ DISALLOW_MOVE_AND_ASSIGN (mutation_log_private);
452+
452453 // async write pending mutations into log file
453454 // Preconditions:
454455 // - _pending_write != nullptr
0 commit comments