Jose Luis López created HDFS-17985:
--------------------------------------
Summary: TestStandbyCheckpoints reads the standby's
lastCheckpointTime before the standby has updated it
Key: HDFS-17985
URL: https://issues.apache.org/jira/browse/HDFS-17985
Project: Hadoop HDFS
Issue Type: Test
Components: ha, namenode, test
Reporter: Jose Luis López
{\{testLastCheckpointTime}} waits for the active to hold the new image
(\{{waitForCheckpoint(cluster, 0, [23])}}), then reads \{{nns[1]}}'s
\{{getStandbyLastCheckpointTime()}}. That wait does not cover the read.
\{{nns[2]}} is an observer and runs no \{{StandbyCheckpointer}}, so \{{nns[1]}}
is the uploader. It updates its own lastCheckpointTime only after
\{{doCheckpoint()}} returns, which is after \{{ImageServlet}} has already
updated the active. The interval can therefore read 0 against an expected 3000.
Fix: wait for \{{nns[1]}} to hold checkpoint 23 and for its time to advance.
Wait for the active's \{{mostRecentCheckpointTime}} on its own too. Split the
combined assertion into two, each with a message. \{{testPutFsimagePartFailed}}
reads the time the same way and gets the same wait.
Test-only change.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]