Merge pull request #27 from vmware/spentakota_AddLogs
chore: add info logs in sleep case for kinesis backoff errors
This commit is contained in:
commit
711b72932a
1 changed files with 2 additions and 0 deletions
|
|
@ -182,10 +182,12 @@ func (sc *PollingShardConsumer) getRecords() error {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if err == localTPSExceededError {
|
if err == localTPSExceededError {
|
||||||
|
log.Infof("localTPSExceededError so sleep for a second")
|
||||||
sc.waitASecond(sc.currTime)
|
sc.waitASecond(sc.currTime)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if err == maxBytesExceededError {
|
if err == maxBytesExceededError {
|
||||||
|
log.Infof("maxBytesExceededError so sleep for %+v seconds", coolDownPeriod)
|
||||||
time.Sleep(time.Duration(coolDownPeriod) * time.Second)
|
time.Sleep(time.Duration(coolDownPeriod) * time.Second)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue