Skip to content

GEODE-10123: Improve create region checks#7443

Merged
mkevo merged 1 commit intoapache:developfrom
Nordix:feature/GEODE-10123
Mar 22, 2022
Merged

GEODE-10123: Improve create region checks#7443
mkevo merged 1 commit intoapache:developfrom
Nordix:feature/GEODE-10123

Conversation

@jvarenina
Copy link
Contributor

@jvarenina jvarenina commented Mar 15, 2022

Sometimes the "create region" command executes successfully during
servers restart even though region is already available in the cluster
configuration. When this happens, cluster configuration contains a
duplicated region, and servers throw
"org.apache.geode.cache.RegionExistsException" at startup.

CreateRegionCommand checks whether there is already an existing
region using the DistributedRegionMXBean service. This service is
unreliable during restarts, as it takes some time for the locator to
accumulate region information.

In addition to checks done against the DistributedRegionMXBean
information, this solution introduces the same checks against cluster
configuration (if used) stored in locators. This way, the "create region"
command is rejected immediately by the locator instead of the
servers.

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

  • Has your PR been rebased against the latest commit within the target branch (typically develop)?

  • Is your initial contribution a single, squashed commit?

  • Does gradlew build run cleanly?

  • Have you written or updated unit tests to verify your changes?

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

@jvarenina jvarenina force-pushed the feature/GEODE-10123 branch 4 times, most recently from 2737abc to 82cee52 Compare March 16, 2022 10:38
@jvarenina jvarenina marked this pull request as ready for review March 16, 2022 14:11
@mhansonp
Copy link
Contributor

Looks good. Thanks for the explanation of the PR.

Sometimes the "create region" command executes successfully during
servers restart even though region is already available in the cluster
configuration. When this happens, cluster configuration contains a
duplicated region, so servers throw
"org.apache.geode.cache.RegionExistsException" at startup.

CreateRegionCommand class checks whether there is already an existing
region using the DistributedRegionMXBean service. This service is
unreliable during restarts, as it takes some time for the locator to
accumulate region information.

In addition to checks done against the DistributedRegionMXBean
information, this solution introduces the same checks against cluster
configuration (if used) stored in locators.
@jvarenina jvarenina force-pushed the feature/GEODE-10123 branch from 82cee52 to 37e089e Compare March 21, 2022 14:15
@mkevo mkevo merged commit f4d173b into apache:develop Mar 22, 2022
jvarenina added a commit to Nordix/geode that referenced this pull request Mar 22, 2022
Sometimes the "create region" command executes successfully during
servers restart even though region is already available in the cluster
configuration. When this happens, cluster configuration contains a
duplicated region, so servers throw
"org.apache.geode.cache.RegionExistsException" at startup.

CreateRegionCommand class checks whether there is already an existing
region using the DistributedRegionMXBean service. This service is
unreliable during restarts, as it takes some time for the locator to
accumulate region information.

In addition to checks done against the DistributedRegionMXBean
information, this solution introduces the same checks against cluster
configuration (if used) stored in locators.
@jvarenina jvarenina deleted the feature/GEODE-10123 branch March 22, 2022 12:20
jvarenina added a commit to Nordix/geode that referenced this pull request Apr 14, 2022
Sometimes the "create region" command executes successfully during
servers restart even though region is already available in the cluster
configuration. When this happens, cluster configuration contains a
duplicated region, so servers throw
"org.apache.geode.cache.RegionExistsException" at startup.

CreateRegionCommand class checks whether there is already an existing
region using the DistributedRegionMXBean service. This service is
unreliable during restarts, as it takes some time for the locator to
accumulate region information.

In addition to checks done against the DistributedRegionMXBean
information, this solution introduces the same checks against cluster
configuration (if used) stored in locators.
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.

4 participants