Skip to content

RATIS-1886. AppendLog sleep fixed time cause significant drop in write throughput.#929

Merged
szetszwo merged 4 commits intoapache:masterfrom
szetszwo:RATIS-1886
Oct 4, 2023
Merged

RATIS-1886. AppendLog sleep fixed time cause significant drop in write throughput.#929
szetszwo merged 4 commits intoapache:masterfrom
szetszwo:RATIS-1886

Conversation

@szetszwo
Copy link
Contributor

@szetszwo
Copy link
Contributor Author

szetszwo commented Sep 29, 2023

Found an unrelated NPE in the previous build: https://github.com/apache/ratis/actions/runs/6345236213/job/17236854118?pr=929#step:5:988

Caused by: java.lang.NullPointerException: leaderState == null
	at org.apache.ratis.server.impl.RoleInfo.shutdownLeaderState(RoleInfo.java:89)
	at org.apache.ratis.server.impl.RaftServerImpl.changeToFollower(RaftServerImpl.java:584)
	at org.apache.ratis.server.impl.RaftServerImpl.changeToFollowerAndPersistMetadata(RaftServerImpl.java:601)
	at org.apache.ratis.server.impl.LeaderStateImpl.stepDown(LeaderStateImpl.java:676)
	at org.apache.ratis.server.impl.LeaderStateImpl.checkLeadership(LeaderStateImpl.java:1080)
	at org.apache.ratis.server.impl.LeaderStateImpl$EventProcessor.run(LeaderStateImpl.java:738)

Will fix here since it is just a one line fix.

Copy link
Member

@SzyWilliam SzyWilliam left a comment

Choose a reason for hiding this comment

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

+1 the changes look good to me. Thanks @szetszwo a lot for the fixing the throughput drop!

It seems that writes with small payloads (<10ms) are more sensitive to the AppendLog sleep time. With this patch and other recent improvements, I can't wait to see the throuput improvements in 3.0.0🥇

@szetszwo
Copy link
Contributor Author

szetszwo commented Oct 3, 2023

@SzyWilliam , Thanks a lot for reviewing this!

Oops, I did not change the default to 1ms. Could you take a look again?

Copy link
Contributor

@codings-dan codings-dan left a comment

Choose a reason for hiding this comment

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

LGTM

@szetszwo szetszwo merged commit fe1cbbb into apache:master Oct 4, 2023
@szetszwo
Copy link
Contributor Author

szetszwo commented Oct 4, 2023

@SzyWilliam , @codings-dan , thanks a lot for reviewing this!

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.

3 participants