Fixed race condition in detached job scheduling - #25592
Merged
Merged
Conversation
arjantijms
approved these changes
Jul 5, 2025
dmatej
force-pushed
the
asyncjobs
branch
3 times, most recently
from
July 6, 2025 13:03
e7c16f2 to
d7136c1
Compare
dmatej
marked this pull request as draft
July 6, 2025 20:37
dmatej
force-pushed
the
asyncjobs
branch
2 times, most recently
from
July 10, 2025 23:14
77d5fda to
84e5661
Compare
dmatej
marked this pull request as ready for review
July 10, 2025 23:15
dmatej
marked this pull request as draft
July 11, 2025 06:53
dmatej
force-pushed
the
asyncjobs
branch
2 times, most recently
from
July 11, 2025 12:52
37425fd to
36da910
Compare
- Increased timeout for the first start-domain - on GH Actions Mac 30 seconds was not enough - ASADMIN caused initialization of the GlassFishTestEnvironment before any test started which was a bit confusing, especially when it failed declaring that preparations to run the WINDOWS test on Mac failed. Signed-off-by: David MatÄjÄek <david.matejcek@omnifish.ee>
dmatej
force-pushed
the
asyncjobs
branch
3 times, most recently
from
July 11, 2025 23:24
ec747ec to
69ec045
Compare
dmatej
marked this pull request as ready for review
July 11, 2025 23:24
- The consequence of refactoring is the fix
- Fixed bad design; onAdminCommandEvent could be executed asynchronously to
the static invokeAsync method which caused unpredictable result when using
the --detach argument.
- I did not see it first, so I made some code cleanup before I understood what
was happening.
- Deleted unused methods
- inlined some utility methods which were used just on a single place
- removed sharing loggers (very confusing when you want to find something)
- renamed classes and methods so now it makes more sense
- merged AdminCommandStateImpl and AdminCommandInstanceImpl and renamed
to AdminCommandJob. Deserialized "reflections" are just simple pojos now.
- ExecutorServiceFactory was removed - now we have named threads.
- Removed swallowing exceptions on several places - log or rethrow
- Improved responsibilities
- Most important players: SseAdminCommandInvoker and ActionReport
Signed-off-by: David MatÄjÄek <david.matejcek@omnifish.ee>
OndroMih
approved these changes
Jul 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
onAdminCommandEventwas executed asynchronously to the staticinvokeAsyncmethod which caused unpredictable result when using the--detachargument.AdminCommandStateImplandAdminCommandInstanceImpland renamed toAdminCommandJob. Deserialized "reflections" are just simple pojos now.ExecutorServiceFactorywas removed - now we have properly named threads.