Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HADOOP-15880. Reduce redundant end logsegment rpc #2750

Closed
wants to merge 1 commit into from

Conversation

lamberken
Copy link
Member

@lamberken lamberken commented Mar 6, 2021

ISSUE

https://issues.apache.org/jira/browse/HDFS-15880

OUTLINE

The SNN always send end logsegment rpc in cycle(dfs.ha.log-roll.period=120s).

  • If no edit request occurs during this period, ANN will still send the RPC request to the journal node which is redundant.
  • The FSEditLog#endCurrentLogSegment method is marked synchronized, it will affetc other rpc requests.

Editlogs only contains two operations :

LogSegmentOp [opCode=OP_START_LOG_SEGMENT, txid=-12345]
LogSegmentOp [opCode=OP_END_LOG_SEGMENT, txid=-12345]
[dcadmin@dw-work-006 ~]$ ll /work/data/hadoop/hdfs/journalnode/nn-work/current/
total 1100
-rw-r----- 1 dcadmin dcadmin       8 Mar  7 01:02 committed-txid
-rw-r----- 1 dcadmin dcadmin      42 Mar  7 00:35 edits_0000000000000000001-0000000000000000002
-rw-r----- 1 dcadmin dcadmin      42 Mar  7 00:37 edits_0000000000000000003-0000000000000000004
-rw-r----- 1 dcadmin dcadmin      42 Mar  7 00:39 edits_0000000000000000005-0000000000000000006
-rw-r----- 1 dcadmin dcadmin      42 Mar  7 00:41 edits_0000000000000000007-0000000000000000008
-rw-r----- 1 dcadmin dcadmin      42 Mar  7 00:43 edits_0000000000000000009-0000000000000000010
-rw-r----- 1 dcadmin dcadmin      42 Mar  7 00:45 edits_0000000000000000011-0000000000000000012
-rw-r----- 1 dcadmin dcadmin      42 Mar  7 00:48 edits_0000000000000000013-0000000000000000014
-rw-r----- 1 dcadmin dcadmin      42 Mar  7 00:50 edits_0000000000000000015-0000000000000000016

@lamberken lamberken marked this pull request as draft March 7, 2021 10:50
@lamberken lamberken closed this Mar 8, 2021
@lamberken lamberken deleted the patch-15880 branch May 26, 2021 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant