[
https://issues.apache.org/jira/browse/HDFS-16991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17745488#comment-17745488
]
ASF GitHub Bot commented on HDFS-16991:
---------------------------------------
hadoop-yetus commented on PR #5591:
URL: https://github.com/apache/hadoop/pull/5591#issuecomment-1645204790
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Logfile | Comment |
|:----:|----------:|--------:|:--------:|:-------:|
| +0 :ok: | reexec | 0m 0s | | Docker mode activated. |
| -1 :x: | docker | 0m 4s | | Docker failed to build run-specific
yetus/hadoop:tp-30994}. |
| Subsystem | Report/Notes |
|----------:|:-------------|
| GITHUB PR | https://github.com/apache/hadoop/pull/5591 |
| Console output |
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5591/7/console |
| versions | git=2.17.1 |
| Powered by | Apache Yetus 0.14.0 https://yetus.apache.org |
This message was automatically generated.
> Fix testMkdirsRaceWithObserverRead
> ----------------------------------
>
> Key: HDFS-16991
> URL: https://issues.apache.org/jira/browse/HDFS-16991
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs
> Affects Versions: 3.3.4
> Reporter: fanluo
> Assignee: fanluo
> Priority: Minor
> Labels: pull-request-available
>
> The test case testMkdirsRaceWithObserverRead which in TestObserverNode
> sometimes failed like this:
> {code:java}
> java.lang.AssertionError: Client #1 lastSeenStateId=-9223372036854775808
> activStateId=5
> null at org.junit.Assert.fail(Assert.java:89)
> at org.junit.Assert.assertTrue(Assert.java:42)
> at
> org.apache.hadoop.hdfs.server.namenode.ha.TestObserverNode.testMkdirsRaceWithObserverRead(TestObserverNode.java:607)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> {code}
> i think the Thread.sleep() should move into the sub threads, like this:
> {code:java}
> public void run() {
> try {
> fs.mkdirs(DIR_PATH);
> Thread.sleep(150); // wait until mkdir is logged
> clientState.lastSeenStateId = HATestUtil.getLastSeenStateId(fs);
> assertSentTo(fs, 0); FileStatus stat = fs.getFileStatus(DIR_PATH);
> assertSentTo(fs, 2);
> assertTrue("Should be a directory", stat.isDirectory());
> } catch (FileNotFoundException ioe) {
> clientState.fnfe = ioe;
> } catch (Exception e) {
> fail("Unexpected exception: " + e);
> }
> } {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]