Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-8213

Add useConnectionSupports(connectionId, 'rollingIndexCreation') hook

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Developer Tools

      Add a new optional boolean supportsRollingIndexCreation under atlasMetadata in ConnectionInfo. It defaults to false.

      Electron Compass then sees false, compass-web sandbox sees false, compass-web in MMS sees true or false depending on what MMS set it to. It should be true only for clusters (ie. not serverless or data federation) that are dedicated (not shared or free) and that have a replset. And only in an Atlas environment because we have to use the private APIs to create and list rolling indexes.

      We will add a react hook (useSupportsRollingIndexCreation()) for the UI to use so it doesn’t use this connectionInfo.atlasMetadata field directly to calculate these boolean values. That way we can easily change this implementation in the future. Right now we only have one instance of this kind of “gated feature” and we don't know enough to properly architect a solution for this as a category of thing. Keeping it as one boolean(that we don’t even check directly!) leaves it well contained for now. As long as we hide this kind of logic from the depths of the UI we should be fine.

            Assignee:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Reporter:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: