Skip to content

Commit

Permalink
[INLONG-9172][SDK] comment/delete useless debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gunli committed Oct 31, 2023
1 parent 01b9a68 commit 90c5d21
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func (w *worker) handleSendData(req *sendDataReq) {
metrics: w.metrics,
addColumns: w.options.addColumnStr,
}
w.log.Debug("worker[", w.index, "] new a batch:", batch.batchID, ", streamID:", batch.streamID)
//w.log.Debug("worker[", w.index, "] new a batch:", batch.batchID, ", streamID:", batch.streamID)
w.pendingBatches[streamID] = batch
}

Expand Down Expand Up @@ -436,7 +436,7 @@ func (w *worker) handleSendFailed(b *sendFailedBatchReq) {
func (w *worker) backoffRetry(ctx context.Context, batch *batchReq) {
if batch.retries >= w.options.MaxRetries {
batch.done(errSendTimeout)
w.log.Debug("to many reties, batch done:", batch.batchID)
//w.log.Debug("to many reties, batch done:", batch.batchID)
return
}

Expand Down Expand Up @@ -490,7 +490,7 @@ func (w *worker) handleRetry(batch *batchReq, retryOnFail bool) {
batch.retries++
if batch.retries >= w.options.MaxRetries {
batch.done(errSendTimeout)
w.log.Debug("to many reties, batch done:", batch.batchID)
//w.log.Debug("to many reties, batch done:", batch.batchID)
return
}

Expand All @@ -500,9 +500,9 @@ func (w *worker) handleRetry(batch *batchReq, retryOnFail bool) {
}

func (w *worker) handleBatchTimeout() {
for streamID, batch := range w.pendingBatches {
for _, batch := range w.pendingBatches {
if time.Since(batch.batchTime) > w.options.BatchingMaxPublishDelay {
w.log.Debug("worker[", w.index, "] batch timeout, send it now:", batch.batchID, ", streamID:", streamID)
//w.log.Debug("worker[", w.index, "] batch timeout, send it now:", batch.batchID, ", streamID:", streamID)
w.sendBatch(batch, true)
delete(w.pendingBatches, batch.streamID)
}
Expand Down Expand Up @@ -531,7 +531,7 @@ func (w *worker) handleCleanMap() {
return
}

w.log.Debug("clean map")
//w.log.Debug("clean map")
// create a new map and copy the data from the old map
newMap := make(map[string]*batchReq)
for k, v := range w.unackedBatches {
Expand Down Expand Up @@ -585,7 +585,7 @@ func (w *worker) handleRsp(rsp *batchRsp) {
batchID := rsp.batchID
batch, ok := w.unackedBatches[batchID]
if !ok {
w.log.Debug("worker[", w.index, "] batch not found in unackedBatches map:", batchID, ", send time:", rsp.dt, ", now:", time.Now().UnixMilli())
//w.log.Debug("worker[", w.index, "] batch not found in unackedBatches map:", batchID, ", send time:", rsp.dt, ", now:", time.Now().UnixMilli())
w.metrics.incError(errNoMatchReq4Rsp.strCode)
return
}
Expand Down Expand Up @@ -716,7 +716,7 @@ func (w *worker) handleUpdateConn() {
}

func (w *worker) updateConn(old gnet.Conn, err error) {
w.log.Debug("worker[", w.index, "] updateConn")
//w.log.Debug("worker[", w.index, "] updateConn")
newConn, newErr := w.client.getConn()
if newErr != nil {
w.log.Error("get new conn error:", newErr)
Expand Down

0 comments on commit 90c5d21

Please sign in to comment.