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

ISPN-13373 Allow Cache availability to be configured via the console #178

Merged
merged 2 commits into from Jan 26, 2022

Conversation

dpanshug
Copy link
Collaborator

https://issues.redhat.com/browse/ISPN-13373

  • Feature to make cache available from Degraded mode

Copy link
Collaborator

@karesti karesti left a comment

Choose a reason for hiding this comment

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

we need to check the wording with @oraNod
small commets, otherwise LGTM

src/app/CacheManagers/CacheTableDisplay.tsx Outdated Show resolved Hide resolved
src/app/Caches/SetAvailableCache.tsx Outdated Show resolved Hide resolved
src/app/Caches/SetAvailableCache.tsx Outdated Show resolved Hide resolved
src/app/assets/languages/en.json Outdated Show resolved Hide resolved
src/app/Caches/SetAvailableCache.tsx Outdated Show resolved Hide resolved
src/app/Caches/SetAvailableCache.tsx Outdated Show resolved Hide resolved
src/services/cacheService.ts Outdated Show resolved Hide resolved
src/services/cacheService.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@oraNod oraNod left a comment

Choose a reason for hiding this comment

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

Strings look fine to me, @dipguptaredhat Could you please externalize them to the assets/languages/en.json file? I think we'll be good to go then. Thanks.

src/app/assets/languages/en.json Outdated Show resolved Hide resolved
Copy link
Collaborator

@karesti karesti left a comment

Choose a reason for hiding this comment

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

@dipguptaredhat a couple of small latest changes

src/app/assets/languages/en.json Outdated Show resolved Hide resolved
src/app/Caches/SetAvailableCache.tsx Outdated Show resolved Hide resolved
@oraNod
Copy link
Contributor

oraNod commented Jan 25, 2022

@dipguptaredhat Hi, hope you don't mind but I also pushed a commit to your branch for this one. A couple of questions, please. I've built this locally but don't see the cache availability from the console. Looking in the Cache Manager display table changes in this PR I would expect to see the availability there. Maybe I'm missing it. Could you provide a screenshot?

Also where is the "Done" button? I'm not sure where that displays or what the flow is for users to arrive to that modal. Cheers.

@dpanshug
Copy link
Collaborator Author

dpanshug commented Jan 26, 2022

@dipguptaredhat Hi, hope you don't mind but I also pushed a commit to your branch for this one. A couple of questions, please. I've built this locally but don't see the cache availability from the console. Looking in the Cache Manager display table changes in this PR I would expect to see the availability there. Maybe I'm missing it. Could you provide a screenshot?

Also where is the "Done" button? I'm not sure where that displays or what the flow is for users to arrive to that modal. Cheers.

For setting a cache to Available, the cache need to have this configuration

{
  "distributed-cache": {
    "mode": "SYNC",
    "statistics": true,
    "encoding": {
      "key": {
        "media-type": "application/x-protostream"
      },
      "value": {
        "media-type": "application/x-protostream"
      }
    },
    "partition-handling": {
      "when-split": "DENY_READ_WRITES",
      "merge-policy": "NONE"
    }
  }
}

Also the cache need to be in DEGRADED_MODE,
curl -XPOST --digest -u "admin:password" "http://localhost:11222/rest/v2/caches/Test?action=set-availability&availability=DEGRADED_MODE"

Then the "Available" option will be shown as below

Screenshot from 2022-01-26 13-49-17
Screenshot from 2022-01-26 13-49-30

@oraNod
Copy link
Contributor

oraNod commented Jan 26, 2022

Thanks for the screenshots, @dipguptaredhat That's actually really helpful because I was trying to get caches into degraded mode by deliberately crashing nodes (was doing that for a different PR recently). I didn't realize you could also force a cache into degraded mode via REST.

Anyway that looks good to me but I think maybe "Done" should change to "OK" because it's more of a confirmation.

* Strings are externalize to en.json file
Copy link
Contributor

@oraNod oraNod left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @dipguptaredhat

@karesti karesti merged commit e03a797 into infinispan:main Jan 26, 2022
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.

None yet

3 participants