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

Fix create zone on restart rewrites existing data nodes because of trigger key inconsistnecy

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0
    • None

    Description

      Outdated, see UPD

      Currently we have the logic for initialisation of newly created zone that it writes keys

      zoneDataNodesKey(zoneId), zoneScaleUpChangeTriggerKey(zoneId), zoneScaleDownChangeTriggerKey(zoneId), zonesChangeTriggerKey(zoneId)
      

      to metastorage, and condition is

          static CompoundCondition triggerKeyConditionForZonesChanges(long revision, int zoneId) {
              return or(
                      notExists(zonesChangeTriggerKey(zoneId)),
                      value(zonesChangeTriggerKey(zoneId)).lt(ByteUtils.longToBytes(revision))
              );
      

      Recovery process implies that the create zone event will be processed again, but with the higher revision, so data nodes will be rewritten.

      We need to handle this situation, so data nodes will be consistent after restart.

      Possible solution is to change condition to

          static SimpleCondition triggerKeyConditionForZonesCreation(long revision, int zoneId) {
              return notExists(zonesChangeTriggerKey(zoneId));
          }
      
          static SimpleCondition triggerKeyConditionForZonesDelete(int zoneId) {
              return exists(zonesChangeTriggerKey(zoneId));
          }
      

      so we could not rely on revision and check only existence of the key, when we create or remove zone. The problem in this solution is that reordering of the create and remove on some node could lead to not consistent state for zones key in metastorage

      UPD:

      This problem will be resolves once we implement https://issues.apache.org/jira/browse/IGNITE-20561
      In this ticket we need to unmute all tickets that were muted by this ticket

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            maliev Mirza Aliev
            maliev Mirza Aliev
            Sergey Uttsel Sergey Uttsel
            Votes:
            0 Vote for this issue
            Watchers:
            3 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 10m
                1h 10m

                Slack

                  Issue deployment