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

Removing sharding support #370

Closed
wants to merge 1 commit into from

Conversation

dromagnoli
Copy link
Member

@dromagnoli dromagnoli commented Jul 16, 2024

https://osgeo-org.atlassian.net/browse/GEOS-11471

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).

@dromagnoli dromagnoli requested a review from aaime July 16, 2024 10:18
@aaime aaime requested a review from prushforth July 17, 2024 15:59
@aaime
Copy link
Member

aaime commented Jul 17, 2024

Before starting to check changes and code, I run a simple grep finding more leftovers:

aaime@colossus ~/devel/git-gs (mapml-sharding) $ git grep -i shard
... // some unrelated lines containing shard removed here
src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLConstants.java:    /** SHARD_SERVER_PATTERN */
src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLConstants.java:    public static final String SHARD_SERVER_PATTERN = "shardServerPattern";
src/extension/mapml/src/main/java/org/geoserver/mapml/xml/Input.java: *       <attribute name="shard" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
src/extension/mapml/src/main/java/org/geoserver/mapml/xml/Input.java:    @XmlAttribute(name = "shard")
src/extension/mapml/src/main/java/org/geoserver/mapml/xml/Input.java:    protected String shard;
src/extension/mapml/src/main/java/org/geoserver/mapml/xml/Input.java:     * Gets the value of the shard property.
src/extension/mapml/src/main/java/org/geoserver/mapml/xml/Input.java:    public String getShard() {
src/extension/mapml/src/main/java/org/geoserver/mapml/xml/Input.java:        return shard;
src/extension/mapml/src/main/java/org/geoserver/mapml/xml/Input.java:     * Sets the value of the shard property.
src/extension/mapml/src/main/java/org/geoserver/mapml/xml/Input.java:    public void setShard(String value) {
src/extension/mapml/src/main/java/org/geoserver/mapml/xml/Input.java:        this.shard = value;
src/extension/mapml/src/main/resources/schema/mapml.rnc:  attribute shard { text }?,
src/extension/mapml/src/main/resources/schema/mapml.xsd:      <xs:attribute name="shard"/>
src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLWMSTest.java:    public void testLegacyShardingConfig() throws Exception {
src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLWMSTest.java:        // Although sharding support has been removed, test that everything is working fine
src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLWMSTest.java:        // and no configured sharding is being used even if it was configured (simulating
src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLWMSTest.java:        // an old layer configured in the past with sharding enabled)
src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLWMSTest.java:        mm.put("mapml.enableSharding", true);
src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLWMSTest.java:        mm.put("mapml.shardList", "server1,server2,server3");
src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLWMSTest.java:        mm.put("mapml.shardServerPattern", "{s}.example.com");
src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLWMSTest.java:                "count(//html:map-input[@list='servers'][@type='hidden'][@shard='true'][@name='s'])",

@dromagnoli
Copy link
Member Author

git grep -i shard

Fixed most of them (I was missing a commit when switching to the customDimesion thing).
Note that the testLegacyShardingConfig is actually using sharding config params to mimic a legacy layer that has been configured with sharding, making sure that things are still working and running but no sharding is being used.

I also did a test by configuring a layer with sharding on a default Geoserver, then used the version where sharding code was removed and GeoServer and that layer was still working fine after the restart with the new code.

Copy link
Member

@aaime aaime left a comment

Choose a reason for hiding this comment

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

LGTM

@aaime
Copy link
Member

aaime commented Jul 18, 2024

@prushforth what do you think? Good for public publishing?

@prushforth
Copy link
Collaborator

I don't have the opportunity at the moment to build this, but I think you've probably got it covered by the looks of it. Maybe add the word 'MapML' in the public PR so people don't think I'm deleting something of theirs :-). Otherwise, LGTM.

@dromagnoli
Copy link
Member Author

I don't have the opportunity at the moment to build this, but I think you've probably got it covered by the looks of it. Maybe add the word 'MapML' in the public PR so people don't think I'm deleting something of theirs :-). Otherwise, LGTM.

Correct, I have quickly amended the commit after having created the JIRA ticket.
I will use a better message for the official PR. Thx

@dromagnoli
Copy link
Member Author

FYI: the official PR against GeoServer main is here:
geoserver#7789

@aaime
Copy link
Member

aaime commented Jul 30, 2024

Closing as we have an official PR (which has been merged)

@aaime aaime closed this Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants