@@ -791,13 +791,17 @@ func (a *Applier) ApplyEventQueries(db *gosql.DB, entry *common.DumpEntry) error
791791func (a * Applier ) Stats () (* common.TaskStatistics , error ) {
792792 a .logger .Debug ("Stats" )
793793 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
796798 var delay int64
797799 if a .ai != nil {
798800 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 )
801805 delay = a .ai .timestampCtx .GetDelay ()
802806 }
803807 totalRowsReplay := a .TotalRowsReplayed
@@ -813,7 +817,8 @@ func (a *Applier) Stats() (*common.TaskStatistics, error) {
813817 if a .mysqlContext .Gtid != "" {
814818 // Done copying rows. The totalRowsCopied value is the de-facto number of rows,
815819 // 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 )
817822 } else {
818823 backlog = fmt .Sprintf ("%d/%d" , len (a .fullBytesQueue ), cap (a .fullBytesQueue ))
819824 }
@@ -861,7 +866,8 @@ func (a *Applier) Stats() (*common.TaskStatistics, error) {
861866 RetrievedGtidSet : "" ,
862867 },
863868 BufferStat : common.BufferStat {
864- ApplierTxQueueSize : lenApplyDataEntryQueue ,
869+ ApplierMsgQueueSize : lenApplierMsgQueue ,
870+ ApplierTxQueueSize : lenApplierTxQueue ,
865871 },
866872 Timestamp : time .Now ().UTC ().UnixNano (),
867873 DelayCount : & common.DelayCount {
0 commit comments