@@ -791,13 +791,17 @@ func (a *Applier) ApplyEventQueries(db *gosql.DB, entry *common.DumpEntry) error
791
791
func (a * Applier ) Stats () (* common.TaskStatistics , error ) {
792
792
a .logger .Debug ("Stats" )
793
793
var totalDeltaCopied int64
794
- var lenApplyDataEntryQueue int
795
- var capApplyDataEntryQueue int
794
+ var lenApplierMsgQueue int
795
+ var capApplierMsgQueue int
796
+ var lenApplierTxQueue int
797
+ var capApplierTxQueue int
796
798
var delay int64
797
799
if a .ai != nil {
798
800
totalDeltaCopied = a .ai .TotalDeltaCopied
799
- lenApplyDataEntryQueue = len (a .ai .incrBytesQueue )
800
- capApplyDataEntryQueue = cap (a .ai .incrBytesQueue )
801
+ lenApplierMsgQueue = len (a .ai .incrBytesQueue )
802
+ capApplierMsgQueue = cap (a .ai .incrBytesQueue )
803
+ lenApplierTxQueue = len (a .ai .binlogEntryQueue )
804
+ capApplierTxQueue = cap (a .ai .binlogEntryQueue )
801
805
delay = a .ai .timestampCtx .GetDelay ()
802
806
}
803
807
totalRowsReplay := a .TotalRowsReplayed
@@ -813,7 +817,8 @@ func (a *Applier) Stats() (*common.TaskStatistics, error) {
813
817
if a .mysqlContext .Gtid != "" {
814
818
// Done copying rows. The totalRowsCopied value is the de-facto number of rows,
815
819
// and there is no further need to keep updating the value.
816
- backlog = fmt .Sprintf ("%d/%d" , lenApplyDataEntryQueue , capApplyDataEntryQueue )
820
+ backlog = fmt .Sprintf ("%d/%d" , lenApplierMsgQueue + lenApplierTxQueue ,
821
+ capApplierMsgQueue + capApplierTxQueue )
817
822
} else {
818
823
backlog = fmt .Sprintf ("%d/%d" , len (a .fullBytesQueue ), cap (a .fullBytesQueue ))
819
824
}
@@ -861,7 +866,8 @@ func (a *Applier) Stats() (*common.TaskStatistics, error) {
861
866
RetrievedGtidSet : "" ,
862
867
},
863
868
BufferStat : common.BufferStat {
864
- ApplierTxQueueSize : lenApplyDataEntryQueue ,
869
+ ApplierMsgQueueSize : lenApplierMsgQueue ,
870
+ ApplierTxQueueSize : lenApplierTxQueue ,
865
871
},
866
872
Timestamp : time .Now ().UTC ().UnixNano (),
867
873
DelayCount : & common.DelayCount {
0 commit comments