Skip to content

Conversation

@simbadzina
Copy link
Member

@simbadzina simbadzina commented May 8, 2024

HDFS-17514

Description of PR

When a namenode that had "dfs.namenode.state.context.enabled" set to true is restarted with the configuration set to false, routers will keep using a previously cached state ID.

Without RBF

  • clients that fetched the old stateID could have stale reads even after msyncing
  • new clients will go to the active.

With RBF

  • client that fetched the old stateID could have stale reads like above.
  • New clients will also fetch the stale stateID and potentially have stale reads

New clients that are created after the restart should not fetch the stale state ID.

How was this patch tested?

New unit test
Unit test fails with the patch is PoolAlignmentContext in the second commit.
Unit test pass with the patch.

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 21s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 33m 10s trunk passed
+1 💚 compile 0m 26s trunk passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 compile 0m 24s trunk passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 checkstyle 0m 21s trunk passed
+1 💚 mvnsite 0m 30s trunk passed
+1 💚 javadoc 0m 32s trunk passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javadoc 0m 22s trunk passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 spotbugs 0m 51s trunk passed
+1 💚 shadedclient 21m 8s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 18s the patch passed
+1 💚 compile 0m 18s the patch passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javac 0m 18s the patch passed
+1 💚 compile 0m 17s the patch passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 javac 0m 17s the patch passed
-1 ❌ blanks 0m 0s /blanks-eol.txt The patch has 8 line(s) that end in blanks. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
-0 ⚠️ checkstyle 0m 9s /results-checkstyle-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-project/hadoop-hdfs-rbf: The patch generated 4 new + 0 unchanged - 0 fixed = 4 total (was 0)
+1 💚 mvnsite 0m 19s the patch passed
+1 💚 javadoc 0m 17s the patch passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javadoc 0m 15s the patch passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 spotbugs 0m 46s the patch passed
+1 💚 shadedclient 21m 3s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 26m 10s /patch-unit-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-rbf in the patch passed.
+1 💚 asflicense 0m 23s The patch does not generate ASF License warnings.
111m 45s
Reason Tests
Failed junit tests hadoop.hdfs.server.federation.router.TestNoNamenodesAvailableLongTime
Subsystem Report/Notes
Docker ClientAPI=1.45 ServerAPI=1.45 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6804/1/artifact/out/Dockerfile
GITHUB PR #6804
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 26a45d9cedb4 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / f6c3404
Default Java Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6804/1/testReport/
Max. process+thread count 3979 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6804/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 19s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 34m 9s trunk passed
+1 💚 compile 0m 22s trunk passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 compile 0m 20s trunk passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 checkstyle 0m 18s trunk passed
+1 💚 mvnsite 0m 24s trunk passed
+1 💚 javadoc 0m 25s trunk passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javadoc 0m 18s trunk passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 spotbugs 0m 50s trunk passed
+1 💚 shadedclient 22m 4s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 22s the patch passed
+1 💚 compile 0m 21s the patch passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javac 0m 21s the patch passed
+1 💚 compile 0m 16s the patch passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 javac 0m 16s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 13s /results-checkstyle-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-project/hadoop-hdfs-rbf: The patch generated 5 new + 0 unchanged - 0 fixed = 5 total (was 0)
+1 💚 mvnsite 0m 22s the patch passed
+1 💚 javadoc 0m 16s the patch passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javadoc 0m 14s the patch passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 spotbugs 0m 50s the patch passed
+1 💚 shadedclient 23m 22s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 26m 57s /patch-unit-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-rbf in the patch passed.
+1 💚 asflicense 0m 27s The patch does not generate ASF License warnings.
116m 33s
Reason Tests
Failed junit tests hadoop.hdfs.server.federation.router.TestNoNamenodesAvailableLongTime
Subsystem Report/Notes
Docker ClientAPI=1.45 ServerAPI=1.45 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6804/2/artifact/out/Dockerfile
GITHUB PR #6804
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux b8a9ef06ba87 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / e4e3c55
Default Java Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6804/2/testReport/
Max. process+thread count 4116 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6804/2/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@simbadzina simbadzina marked this pull request as draft May 8, 2024 13:32
@simbadzina simbadzina marked this pull request as ready for review May 8, 2024 14:08
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 19s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 32m 28s trunk passed
+1 💚 compile 0m 25s trunk passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 compile 0m 22s trunk passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 checkstyle 0m 20s trunk passed
+1 💚 mvnsite 0m 29s trunk passed
+1 💚 javadoc 0m 30s trunk passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javadoc 0m 21s trunk passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 spotbugs 0m 50s trunk passed
+1 💚 shadedclient 20m 31s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 21s the patch passed
+1 💚 compile 0m 20s the patch passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javac 0m 20s the patch passed
+1 💚 compile 0m 17s the patch passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 javac 0m 17s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 12s the patch passed
+1 💚 mvnsite 0m 19s the patch passed
+1 💚 javadoc 0m 17s the patch passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javadoc 0m 17s the patch passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 spotbugs 0m 51s the patch passed
+1 💚 shadedclient 19m 50s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 26m 55s hadoop-hdfs-rbf in the patch passed.
+1 💚 asflicense 0m 26s The patch does not generate ASF License warnings.
110m 36s
Subsystem Report/Notes
Docker ClientAPI=1.45 ServerAPI=1.45 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6804/3/artifact/out/Dockerfile
GITHUB PR #6804
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux fa8f140fb26b 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / c245292
Default Java Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6804/3/testReport/
Max. process+thread count 4073 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6804/3/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@simbadzina simbadzina requested a review from ctrezzo May 8, 2024 16:19
@Override
public void receiveResponseState(RpcHeaderProtos.RpcResponseHeaderProto header) {
sharedGlobalStateId.accumulate(header.getStateId());
if (header.getStateId() == 0 && sharedGlobalStateId.get() > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

stateId 0 means no state id right?
This is different than msync being 0?

Copy link
Contributor

Choose a reason for hiding this comment

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

I assume stateId is an integer and protobuf will return 0 for an integer if it is not set?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, stateID 0 means no stateId is set. Msync doesn't have a return value.

There is another bug in the router in that it accepts 0 as a value to advance it's cachedStateID to.
Ideally sharedGlobalStateId.get() > 0 should not be necessary here. For now it captures namenodes that actually had STATE_ID_CONTEXT enabled to begin with. But stale reads could happen with a namenode that has never had STATE_ID_CONTEXT enabled.

Fixing this will touch other tests so I'm debating whether to try fix that in this PR or separately. I'm leaning towards a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove the sharedGlobalStateId.get() > 0, right?

If sharedGlobalStateId.get() < 0, routers already fallback to active and no need to reset. If it is > 0 and then we see a request without StateID, we will reset this counter and routers will fallback to active.

Adding sharedGlobalStateId.get() > 0 doesn't seem to make a difference.

Copy link
Member Author

@simbadzina simbadzina May 9, 2024

Choose a reason for hiding this comment

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

The tests in TestNoNamenodesAvailableLongTime rely on the router allowing a stateId of 0. So having sharedGlobalStateId.get() > 0 allows this behavior while guarding against when the sharedGlobalStateId has advances beyond zero.

The tests in TestNoNamenodesAvailableLongTime do need to be fixed but I would like to limit the scope of this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to fixing the tests and associated check in follow on PR.

Copy link
Contributor

@xinglin xinglin left a comment

Choose a reason for hiding this comment

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

thanks for the quick fix!

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
_ Prechecks _
+1 💚 dupname 0m 00s No case conflicting files found.
+0 🆗 spotbugs 0m 01s spotbugs executables are not available.
+0 🆗 codespell 0m 01s codespell was not available.
+0 🆗 detsecrets 0m 01s detect-secrets was not available.
+1 💚 @author 0m 00s The patch does not contain any @author tags.
+1 💚 test4tests 0m 00s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 85m 42s trunk passed
+1 💚 compile 4m 46s trunk passed
+1 💚 checkstyle 4m 23s trunk passed
+1 💚 mvnsite 4m 51s trunk passed
+1 💚 javadoc 4m 29s trunk passed
+1 💚 shadedclient 141m 10s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 2m 47s the patch passed
+1 💚 compile 2m 17s the patch passed
+1 💚 javac 2m 17s the patch passed
+1 💚 blanks 0m 00s The patch has no blanks issues.
+1 💚 checkstyle 1m 59s the patch passed
+1 💚 mvnsite 2m 24s the patch passed
+1 💚 javadoc 2m 07s the patch passed
+1 💚 shadedclient 148m 54s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 asflicense 5m 16s The patch does not generate ASF License warnings.
399m 15s
Subsystem Report/Notes
GITHUB PR #6804
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname MINGW64_NT-10.0-17763 505bedc9962d 3.4.10-87d57229.x86_64 2024-02-14 20:17 UTC x86_64 Msys
Build tool maven
Personality /c/hadoop/dev-support/bin/hadoop.sh
git revision trunk / c245292
Default Java Azul Systems, Inc.-1.8.0_332-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6804/1/testReport/
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6804/1/console
versions git=2.44.0.windows.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
_ Prechecks _
+1 💚 dupname 0m 00s No case conflicting files found.
+0 🆗 spotbugs 0m 01s spotbugs executables are not available.
+0 🆗 codespell 0m 01s codespell was not available.
+0 🆗 detsecrets 0m 01s detect-secrets was not available.
+1 💚 @author 0m 00s The patch does not contain any @author tags.
+1 💚 test4tests 0m 00s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 87m 50s trunk passed
+1 💚 compile 4m 53s trunk passed
+1 💚 checkstyle 4m 27s trunk passed
+1 💚 mvnsite 4m 55s trunk passed
+1 💚 javadoc 4m 44s trunk passed
+1 💚 shadedclient 141m 31s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 2m 47s the patch passed
+1 💚 compile 2m 19s the patch passed
+1 💚 javac 2m 19s the patch passed
+1 💚 blanks 0m 01s The patch has no blanks issues.
+1 💚 checkstyle 2m 01s the patch passed
+1 💚 mvnsite 2m 25s the patch passed
+1 💚 javadoc 2m 07s the patch passed
+1 💚 shadedclient 152m 26s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 asflicense 5m 47s The patch does not generate ASF License warnings.
405m 55s
Subsystem Report/Notes
GITHUB PR #6804
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname MINGW64_NT-10.0-17763 faac0eb4a8ee 3.4.10-87d57229.x86_64 2024-02-14 20:17 UTC x86_64 Msys
Build tool maven
Personality /c/hadoop/dev-support/bin/hadoop.sh
git revision trunk / c245292
Default Java Azul Systems, Inc.-1.8.0_332-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6804/2/testReport/
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6804/2/console
versions git=2.44.0.windows.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
_ Prechecks _
+1 💚 dupname 0m 00s No case conflicting files found.
+0 🆗 spotbugs 0m 01s spotbugs executables are not available.
+0 🆗 codespell 0m 01s codespell was not available.
+0 🆗 detsecrets 0m 01s detect-secrets was not available.
+1 💚 @author 0m 00s The patch does not contain any @author tags.
+1 💚 test4tests 0m 00s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 108m 42s trunk passed
+1 💚 compile 5m 55s trunk passed
+1 💚 checkstyle 5m 24s trunk passed
+1 💚 mvnsite 5m 57s trunk passed
+1 💚 javadoc 5m 46s trunk passed
+1 💚 shadedclient 174m 23s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 3m 29s the patch passed
+1 💚 compile 2m 51s the patch passed
+1 💚 javac 2m 51s the patch passed
+1 💚 blanks 0m 01s The patch has no blanks issues.
+1 💚 checkstyle 2m 26s the patch passed
+1 💚 mvnsite 2m 59s the patch passed
+1 💚 javadoc 2m 39s the patch passed
+1 💚 shadedclient 189m 29s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 asflicense 6m 21s The patch does not generate ASF License warnings.
500m 17s
Subsystem Report/Notes
GITHUB PR #6804
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname MINGW64_NT-10.0-17763 d80193c83cbe 3.4.10-87d57229.x86_64 2024-02-14 20:17 UTC x86_64 Msys
Build tool maven
Personality /c/hadoop/dev-support/bin/hadoop.sh
git revision trunk / c245292
Default Java Azul Systems, Inc.-1.8.0_332-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6804/3/testReport/
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6804/3/console
versions git=2.44.0.windows.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

if (header.getStateId() == 0 && sharedGlobalStateId.get() > 0) {
sharedGlobalStateId.reset();
} else {
sharedGlobalStateId.accumulate(header.getStateId());
Copy link
Contributor

@ctrezzo ctrezzo May 10, 2024

Choose a reason for hiding this comment

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

@simbadzina I have a naive question: What protects us here from the state where header.getStateId() > 0 && header.getStateId() < sharedGlobalStateId?

It seems like if this case were to occur then sharedGlobalStateId would go backwards.

Copy link
Member Author

Choose a reason for hiding this comment

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

The sharedGlobalStateID is created as new LongAccumulator(Math::max, Long.MIN_VALUE)
So accumulate either keeps the current value or moves it forward.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah makes sense. Thanks.

Copy link
Contributor

@ctrezzo ctrezzo left a comment

Choose a reason for hiding this comment

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

@simbadzina Should we also add a test case to TestPoolAlignmentContext.java to ensure the sharedGlobalStateId moves under the conditions we expect it to?

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
_ Prechecks _
+1 💚 dupname 0m 00s No case conflicting files found.
+0 🆗 spotbugs 0m 01s spotbugs executables are not available.
+0 🆗 codespell 0m 01s codespell was not available.
+0 🆗 detsecrets 0m 01s detect-secrets was not available.
+1 💚 @author 0m 00s The patch does not contain any @author tags.
+1 💚 test4tests 0m 00s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 87m 00s trunk passed
+1 💚 compile 4m 58s trunk passed
+1 💚 checkstyle 4m 26s trunk passed
+1 💚 mvnsite 4m 53s trunk passed
+1 💚 javadoc 4m 32s trunk passed
+1 💚 shadedclient 139m 17s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 2m 54s the patch passed
+1 💚 compile 2m 19s the patch passed
+1 💚 javac 2m 19s the patch passed
+1 💚 blanks 0m 00s The patch has no blanks issues.
+1 💚 checkstyle 2m 16s the patch passed
+1 💚 mvnsite 2m 33s the patch passed
+1 💚 javadoc 2m 08s the patch passed
+1 💚 shadedclient 147m 29s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 asflicense 5m 14s The patch does not generate ASF License warnings.
397m 16s
Subsystem Report/Notes
GITHUB PR #6804
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname MINGW64_NT-10.0-17763 6520897aafc9 3.4.10-87d57229.x86_64 2024-02-14 20:17 UTC x86_64 Msys
Build tool maven
Personality /c/hadoop/dev-support/bin/hadoop.sh
git revision trunk / c245292
Default Java Azul Systems, Inc.-1.8.0_332-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6804/4/testReport/
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6804/4/console
versions git=2.44.0.windows.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@simbadzina
Copy link
Member Author

@simbadzina Should we also add a test case to TestPoolAlignmentContext.java to ensure the sharedGlobalStateId moves under the conditions we expect it to?

Good call. Let me add that.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 19s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 2 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 33m 24s trunk passed
+1 💚 compile 0m 25s trunk passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 compile 0m 20s trunk passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 checkstyle 0m 18s trunk passed
+1 💚 mvnsite 0m 28s trunk passed
+1 💚 javadoc 0m 30s trunk passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javadoc 0m 20s trunk passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 spotbugs 0m 54s trunk passed
+1 💚 shadedclient 20m 9s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 18s the patch passed
+1 💚 compile 0m 18s the patch passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javac 0m 18s the patch passed
+1 💚 compile 0m 16s the patch passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 javac 0m 16s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 12s the patch passed
+1 💚 mvnsite 0m 20s the patch passed
+1 💚 javadoc 0m 17s the patch passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1
+1 💚 javadoc 0m 16s the patch passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
+1 💚 spotbugs 0m 50s the patch passed
+1 💚 shadedclient 20m 23s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 26m 30s /patch-unit-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-rbf in the patch passed.
+1 💚 asflicense 0m 23s The patch does not generate ASF License warnings.
110m 39s
Reason Tests
Failed junit tests hadoop.hdfs.server.federation.router.security.token.TestSQLDelegationTokenSecretManagerImpl
hadoop.hdfs.server.federation.store.driver.TestStateStoreMySQL
Subsystem Report/Notes
Docker ClientAPI=1.44 ServerAPI=1.44 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6804/5/artifact/out/Dockerfile
GITHUB PR #6804
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 01d54fcf6746 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 14ab9f7
Default Java Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu220.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_402-8u402-ga-2ubuntu1~20.04-b06
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6804/5/testReport/
Max. process+thread count 4246 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6804/5/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@ctrezzo ctrezzo left a comment

Choose a reason for hiding this comment

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

+1 LGTM. Thanks @simbadzina !

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
_ Prechecks _
+1 💚 dupname 0m 00s No case conflicting files found.
+0 🆗 spotbugs 0m 01s spotbugs executables are not available.
+0 🆗 codespell 0m 01s codespell was not available.
+0 🆗 detsecrets 0m 01s detect-secrets was not available.
+1 💚 @author 0m 00s The patch does not contain any @author tags.
+1 💚 test4tests 0m 00s The patch appears to include 2 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 93m 47s trunk passed
+1 💚 compile 5m 18s trunk passed
+1 💚 checkstyle 4m 53s trunk passed
+1 💚 mvnsite 5m 36s trunk passed
+1 💚 javadoc 4m 55s trunk passed
+1 💚 shadedclient 151m 19s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 3m 03s the patch passed
+1 💚 compile 2m 36s the patch passed
+1 💚 javac 2m 36s the patch passed
+1 💚 blanks 0m 01s The patch has no blanks issues.
+1 💚 checkstyle 2m 18s the patch passed
+1 💚 mvnsite 2m 40s the patch passed
+1 💚 javadoc 2m 19s the patch passed
+1 💚 shadedclient 162m 22s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 asflicense 5m 40s The patch does not generate ASF License warnings.
431m 44s
Subsystem Report/Notes
GITHUB PR #6804
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname MINGW64_NT-10.0-17763 14da4b14ae4a 3.4.10-87d57229.x86_64 2024-02-14 20:17 UTC x86_64 Msys
Build tool maven
Personality /c/hadoop/dev-support/bin/hadoop.sh
git revision trunk / afb800f
Default Java Azul Systems, Inc.-1.8.0_332-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6804/5/testReport/
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6804/5/console
versions git=2.45.0.windows.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
_ Prechecks _
+1 💚 dupname 0m 00s No case conflicting files found.
+0 🆗 spotbugs 0m 01s spotbugs executables are not available.
+0 🆗 codespell 0m 01s codespell was not available.
+0 🆗 detsecrets 0m 01s detect-secrets was not available.
+1 💚 @author 0m 00s The patch does not contain any @author tags.
+1 💚 test4tests 0m 00s The patch appears to include 2 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 95m 50s trunk passed
+1 💚 compile 5m 42s trunk passed
+1 💚 checkstyle 4m 53s trunk passed
+1 💚 mvnsite 5m 33s trunk passed
+1 💚 javadoc 5m 08s trunk passed
+1 💚 shadedclient 157m 21s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 3m 02s the patch passed
+1 💚 compile 2m 30s the patch passed
+1 💚 javac 2m 30s the patch passed
+1 💚 blanks 0m 00s The patch has no blanks issues.
+1 💚 checkstyle 2m 13s the patch passed
+1 💚 mvnsite 2m 44s the patch passed
+1 💚 javadoc 2m 17s the patch passed
+1 💚 shadedclient 163m 47s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 asflicense 5m 47s The patch does not generate ASF License warnings.
441m 52s
Subsystem Report/Notes
GITHUB PR #6804
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname MINGW64_NT-10.0-17763 3998dbde031f 3.4.10-87d57229.x86_64 2024-02-14 20:17 UTC x86_64 Msys
Build tool maven
Personality /c/hadoop/dev-support/bin/hadoop.sh
git revision trunk / 14ab9f7
Default Java Azul Systems, Inc.-1.8.0_332-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6804/7/testReport/
modules C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6804/7/console
versions git=2.45.0.windows.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@simbadzina
Copy link
Member Author

Failing tests in continuous-integration unrelated to my changes

 Failed junit tests  
|  hadoop.hdfs.server.federation.router.security.token.TestSQLDelegationTokenSecretManagerImpl 
|  hadoop.hdfs.server.federation.store.driver.TestStateStoreMySQL 

@simbadzina simbadzina merged commit 6a4f0be into apache:trunk May 14, 2024
K0K0V0K pushed a commit to K0K0V0K/hadoop that referenced this pull request May 17, 2024
K0K0V0K pushed a commit to K0K0V0K/hadoop that referenced this pull request May 17, 2024
NyteKnight pushed a commit to NyteKnight/hadoop that referenced this pull request Jun 25, 2024
…es not set stateID in RPC response header. (apache#6804)

(Cherry-picked from 6a4f0be)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants