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

Issue 24900 part 1: document and refactor, part 2: add first step in PoolManagerImpl unit test #24901

Closed
wants to merge 472 commits into from

Conversation

escay
Copy link
Contributor

@escay escay commented Apr 9, 2024

Draft for now, I would like to add more unit tests and I would like to remove a number of TODO statements I added in ConnectionPool and PoolManagerImpl classes.

Part 1 for issue #24900 Document and rename some ResourceHandle fields. Document and rename some ConnectionPool fields. Remove some unused methods and constructor parameters. Functional / possible incompatibility changes in DataStructureFactory and in ResourceHandle due to constructor changes.
(Maybe part 1 is a bit too much, I altered a few interfaces and removed unused parameters)

Part 2 for issue #24900 Start with a new PoolManagertImpl unit test to understand enlisted versus busy states of Resource handles and the wiring inside a transaction to keep track of all used resources.

@escay
Copy link
Contributor Author

escay commented Apr 12, 2024

Part 3 for issue #24900 adds some more documentation. Main item of this commit is:

  • Changed unit test to show 2 points where I would expect different behaviour. In case of resourceAbortOccurred and resourceErrorOccurred the connectionErrorOccurred flag of the resource is not set, while it is set in badConnectionClosed logic.
  • Changed unit test to show removing resources from a transaction seems to behave as expected for basic scenarios.

arjantijms and others added 29 commits June 24, 2024 15:50
…mmand-logger

New feature: Admin command logger
Signed-off-by: Alexander Pinčuk <[email protected]>
Signed-off-by: Alexander Pinčuk <[email protected]>
Signed-off-by: Alexander Pinčuk <[email protected]>
Signed-off-by: Alexander Pinčuk <[email protected]>
…ty-tck

Add standalone Jakarta JSON Processing Pluggability TCK
Signed-off-by: Alexander Pinčuk <[email protected]>
Remove the temporary service and use the HK2 topic service instead
Replaced method call incompatible with Java 11
Signed-off-by: Alexander Pinčuk <[email protected]>
Also report the error immediately, don't run the command again

Adds tests for the startserv script. For that, improves the process manager to allow waiting until a text it output instead of waiting for the process to complete.
Add missing dependency to GF Embedded All and Web
@escay
Copy link
Contributor Author

escay commented Sep 5, 2024

Part 4 for issue #24900 adds more detailed logging I used in the last months. During rebase I made some merge errors, so commit also contains some merge work from part 1,2,3.
Some import order is wrong, local fast build succeeded / did not fail on the new checkstyle rules for imports.

@dmatej
Copy link
Contributor

dmatej commented Sep 7, 2024

I am bit confused why there's so many changes and some look like they already are in the master branch. Is it some GitHub issue? Seems so ... I tried locally:

  • PoolManagerImplTest contains windows eolns, You can configure it in Eclipse IDE and other editors. Weird that Jenkins did not complain.... Aha, I did not add this rule to checkstyle.xml yet ...
  • It looks well otherwise

@escay
Copy link
Contributor Author

escay commented Sep 7, 2024

@dmatej Not sure what happened. I had a few tasks from May I wanted to rebase to the most recent master (maybe I used an incorrect approach into getting all master tasks into this branch), then I made a few mistakes in merging the import changes. I will try to clean it up and make a correct pull request. This should have been draft so far.

@dmatej
Copy link
Contributor

dmatej commented Sep 7, 2024

Just replace those crlf with lf (linux) and I believe it will be alright. I tried to fetch and compare your brach with master and it seems ok, just github is somehow confused and shows diff to some old commit.

@escay escay marked this pull request as ready for review September 9, 2024 11:28
@escay
Copy link
Contributor Author

escay commented Sep 9, 2024

Not sure why the last build failed and the build before the 'crlf' fix did not fail. Perhaps a rebuild is needed, but I cannot start it I think.
The commits together:

Part 1 for issue #24900 Document and rename some Resource…
b1d3069

Part 2 for issue #24900 Start with a new PoolManagertImpl…
6ec3390

Part 3 for issue #24900 More documentation and more unit …
bb41ac5

Part 4 for issue #24900 Add more detailed logging to impr…
027b7d2

Merge branch 'issue_24900' of https://github.com/escay/glassfish into…
f000acd

Fix checkstyle for issue #24900 merge.
d9d1f62

Change 'git ls-files --eol' value i/-text to i/lf
e902173

Solve issue #24900
The TODOs (mainly around PoolManagerImpl) I added in the code I plan to investigate later on to see if I can improve/solve them.

@pzygielo
Copy link
Contributor

pzygielo commented Sep 9, 2024

472 commits, 4006 files - seriously?

@escay
Copy link
Contributor Author

escay commented Sep 9, 2024

472 commits, 4006 files - seriously?

I did a rebase last week to get my changes from May in this branch to work, it is only the last 7 commits. Maybe I rebased wrong as mentioned above. Github somehow shows all changes since June in the full list, which are not mine.

@pzygielo
Copy link
Contributor

pzygielo commented Sep 9, 2024

472 commits, 4006 files - seriously?

I did a rebase last week to get my changes from May in this branch to work, it is only the last 7 commits. Maybe I rebased wrong as mentioned above.

I will try to clean it up and make a correct pull request.

I was waiting for that.

@escay
Copy link
Contributor Author

escay commented Sep 9, 2024

I didn't because @dmatej told me to just commit the lf change.
@pzygielo and @dmatej Let me know what to do.

@pzygielo
Copy link
Contributor

pzygielo commented Sep 9, 2024

Why changes from 8.0 are merged-in? I'm against pulling them in with this PR.

Edit: the commit I meant was already in master. 😞

@pzygielo
Copy link
Contributor

pzygielo commented Sep 9, 2024

I didn't because @dmatej told me to just commit the lf change.

But it didn't work, did it? And yet you marked as ready to review. So I comment on what I see.

@escay
Copy link
Contributor Author

escay commented Sep 9, 2024

I think the crlf / lf linefeed change in 1 unit test file succeeded. I do not know why the build failed in the ejb_group_2 set, and I cannot start a new build to see if it was an environment issue. It was not the linefeed change in the unit test file.
I only rebased to master as far as I know, I do not know the 8.0 branch names.

If needed I can create a new branch and do everything fresh, so you can more easily review 4 cleaner commits.

@pzygielo
Copy link
Contributor

pzygielo commented Sep 9, 2024

I cannot start a new build to see if it was an environment issue.

Started build no. 11.

@pzygielo
Copy link
Contributor

pzygielo commented Sep 9, 2024

@escay
Copy link
Contributor Author

escay commented Sep 9, 2024

@pzygielo It looks like the changes indeed. But I do not see a few new files like InjectionUtil and PoolManagerImplTest.

@pzygielo
Copy link
Contributor

pzygielo commented Sep 9, 2024

I do not see a few new files like InjectionUtil and PoolManagerImplTest.

True, I see I've missed untracked on commit.
Updated my branch for consistency.

@dmatej
Copy link
Contributor

dmatej commented Sep 9, 2024

I reviewed using this command without --stat. GitHub's UI failed in this case.

git diff -w -M eclipse/master..escay/issue_24900 --stat

@dmatej dmatej added this to the 7.0.18 milestone Sep 9, 2024
@OndroMih
Copy link
Contributor

Is it maybe better to close this PR and create it again, so that it contains only the real changes?

@escay
Copy link
Contributor Author

escay commented Sep 21, 2024

(No problem for me, just let me know)

@pzygielo pzygielo closed this Sep 21, 2024
@pzygielo pzygielo removed this from the 7.0.18 milestone Sep 21, 2024
@pzygielo
Copy link
Contributor

just let me know

@escay - please do

@dmatej
Copy link
Contributor

dmatej commented Sep 23, 2024

GOTO replacement of this PR: #25155

@escay escay deleted the issue_24900 branch October 9, 2024 11:26
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.