Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-3380

MiniOzoneHAClusterImpl#initOMRatisConf will reset the configs and causes for test failures

    XMLWordPrintableJSON

Details

    Description

      While I was debugging some code paths using miniOzoneCluster:

      For example in TestOzoneHAManager:

      it plans to trigger snapshots at threshold 50 and same was configured and passed to MiniOzoneHACluster. But inside MiniOzoneHAClusterImpl#initOMRatisConf, it will silently reset to 100L. So, test will expect snapshot to trigger after 50 transactions, but it will not.

       

      It will keep wait even after rolling at 50:

      GenericTestUtils.waitFor(() -> {
      if (ozoneManager.getRatisSnapshotIndex() > 0)

      Unknown macro: { return true; }

      return false;
      }, 1000, 100000);

       

      2020-04-12 03:54:21,296 [omNode-1@group-523986131536-SegmentedRaftLogWorker] INFO segmented.SegmentedRaftLogWorker (SegmentedRaftLogWorker.java:execute(583)) - omNode-1@group-523986131536-SegmentedRaftLogWorker: created new log segment /Users/ugangumalla/Work/repos/hadoop-ozone/hadoop-ozone/integration-test/target/test-dir/MiniOzoneClusterImpl-fce544cd-3a80-4b0b-ac92-463cf391975c/omNode-1/ratis/c9bc4cf4-3bc3-3c60-a66b-523986131536/current/log_inprogress_49

       

      So, respecting user passed configurations will fix the issue. I will post the patch later in some time.

      Attachments

        Issue Links

          Activity

            People

              umamaheswararao Uma Maheswara Rao G
              umamaheswararao Uma Maheswara Rao G
              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 - 10m
                  10m