Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-15285

Properly split two ConfigurationManager instances

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha2
    • 3.0.0-alpha3
    • None

    Description

      Currently you can see "WARNING: Configuration listener has already been set." message on node start. That's not good, it means that one of configuration managers reuses the same storages and it doesn't work. It's a bad design and leads to weird bugs and unpredictable system behavior.

      The reason is this line of code:

      cfgStorages.add(new DistributedConfigurationStorage(metaStorageMgr, vaultMgr));
      

      What's need to be done is changing ConfigurationManager constructor so that it only takes one storage, not the list. Such decision will lead to two major consequences:

      • REST module will have to deal with two ConfigurationManager instances. It's challenging to understand in advance the exact instance that it should use. Valid behavior should be discussed during implementation.
      • Classes like ConfigurationRegistry and ConfigurationChanger operate with collections of storages. They should be refactored.

      Validators instances will probably be duplicated in both managers. It's hard to avoid duplication if we don't have ConfigurationManagerFactory or something, but having factory to create two well know instances is an overkill. Anyway, some approaches for deduplication should be discussed during implementation as well.

      Attachments

        Issue Links

          Activity

            People

              ktkalenko@gridgain.com Kirill Tkalenko
              ibessonov Ivan Bessonov
              Ivan Bessonov Ivan Bessonov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m