Skip to content

Comments

wait a BackOff Time when rereplicate failed#2967

Merged
pkumar-singh merged 2 commits intoapache:masterfrom
StevenLuMT:master_addBackOffTime
Jan 13, 2022
Merged

wait a BackOff Time when rereplicate failed#2967
pkumar-singh merged 2 commits intoapache:masterfrom
StevenLuMT:master_addBackOffTime

Conversation

@StevenLuMT
Copy link
Member

Descriptions of the changes in this PR:

Motivation

the other bookie restart,rereplicate will run failed for BookieIdNotResolvedException when recover the IN_RECOVERY ledger,
then the ReplicationWorker will cost more cpu time during the other bookie is restarting.
so wait a BackOff Time when rereplicate run failed to reduce CPU Resource

Changes

  1. check rereplicate status
  2. when rereplicate run fail ,call method waitBackOffTime to wait a moment

when the other bookie restart,rereplicate will run failed for BookieIdNotResolvedException,
so wait a BackOff Time when rereplicate run failed
@StevenLuMT
Copy link
Member Author

rerun failure checks

@StevenLuMT
Copy link
Member Author

StevenLuMT commented Dec 29, 2021

@nicoloboschi @dlg99 @eolivelli
If you have time, please help me review it, thank you.

}
} catch (InterruptedException e) {
LOG.info("InterruptedException "
LOG.error("InterruptedException "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you changing this to ERROR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eolivelli
it may be manual or unexcept interrupted, this log's level should be warn or error, I think

@StevenLuMT StevenLuMT requested a review from eolivelli December 30, 2021 01:32
@StevenLuMT
Copy link
Member Author

@pkumar-singh
If you have time, please help me review it, thank you.

Copy link
Member

@pkumar-singh pkumar-singh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StevenLuMT
Copy link
Member Author

LGTM
@pkumar-singh
thanks very much,if this pr has no problem , help me merge it

@pkumar-singh
Copy link
Member

@eolivelli If seems OK to you kindly approve and merge.

@StevenLuMT
Copy link
Member Author

@eolivelli
if this pr has no problem , help me merge it,thanks

@pkumar-singh pkumar-singh merged commit e7688fa into apache:master Jan 13, 2022
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
* reduce CPU Resource:
when the other bookie restart,rereplicate will run failed for BookieIdNotResolvedException,
so wait a BackOff Time when rereplicate run failed

* clean error code

Co-authored-by: lushiji <lushiji@didiglobal.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants