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

[GEOS-10813] -- jdbcconfig cache bug,changed the workspace name #6473

Merged
merged 4 commits into from Jan 15, 2023
Merged

[GEOS-10813] -- jdbcconfig cache bug,changed the workspace name #6473

merged 4 commits into from Jan 15, 2023

Conversation

Tian-geer
Copy link
Contributor

@Tian-geer Tian-geer commented Jan 3, 2023

GEOS-10813

See jira ticket for details.

Checklist

For core and extension modules:

  • New unit tests have been added covering the changes.
  • Documentation has been updated (if change is visible to end users).
  • The REST API docs have been updated (when changing configuration objects or the REST controllers).
  • There is an issue in the GeoServer Jira (except for changes that do not affect administrators or end users in any way).
  • Commit message(s) must be in the form [GEOS-XYZWV] Title of the Jira ticket.
  • Bug fixes and small new features are presented as a single commit.
  • Each commit has a single objective (if there are multiple commits, each has a separate JIRA ticket describing its goal).

@aaime
Copy link
Member

aaime commented Jan 3, 2023

@NielsCharlier or @groldan could you have a look?

@sikeoka
Copy link
Contributor

sikeoka commented Jan 6, 2023

I tested this and it seems to work but could you add a line in the comments to explain why changing the priority is fixing this problem?

@Tian-geer
Copy link
Contributor Author

Because the cache is cleared in 【CatalogClearingListener】, but oldName is cached again in 【NamespaceWorkspaceConsistencyListener#handleModifyEvent 】. The listeners are sorted by priority in 【CatalogImpl#addListener】. Raise the priority of xx so that the cache can be cleared at the end
jdbcConfig bug
image
image
image

@sikeoka
Copy link
Contributor

sikeoka commented Jan 9, 2023

Could you add something in the code comments that you're changing the default priority so that NamespaceWorkspaceConsistencyListener is always run first to make it clear for anyone looking at the code in the future?

@Tian-geer
Copy link
Contributor Author

Comments have been added for description

@NielsCharlier
Copy link
Contributor

Looks good to me

@sikeoka sikeoka added backport 2.21.x Instructs the bot to create a 2.21.x backport PR on merge backport 2.22.x Instructs the bot to create a 2.22.x backport PR on merge labels Jan 13, 2023
@sikeoka
Copy link
Contributor

sikeoka commented Jan 13, 2023

Can you revert your CatalogImpl change so that this PR is only changing one file (ConfigDatabase)? The QA check is failing on your CatalogImpl change which isn't necessary for this PR. I will merge this PR after GitHub is showing only one changed file.

@Tian-geer
Copy link
Contributor Author

Comments for catalogImpl were deleted

@sikeoka sikeoka merged commit 8b1ecd4 into geoserver:main Jan 15, 2023
dieterstueken pushed a commit to dieterstueken/geoserver that referenced this pull request Jan 17, 2023
…erver#6473)

* [GEOS-10813] -- jdbcconfig cache bug,changed the workspace name,but cached the old workspace name

* [GEOS-10813] -- Add a comment describing listener priority

* Revert "[GEOS-10813] -- Add a comment describing listener priority"

This reverts commit 560d5d2.

* [GEOS-10813] -- remove CatalogImpl comment
@Tian-geer Tian-geer deleted the fix-jdbcconfig branch December 19, 2023 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.21.x Instructs the bot to create a 2.21.x backport PR on merge backport 2.22.x Instructs the bot to create a 2.22.x backport PR on merge
Projects
None yet
4 participants