code: private void cleanMGen() throws MgmtZooKeeperException {
          try {
          	PartitionGroup.PartitionGroupData pgM = pg.clonePersistentData();
              pgM.cleanMGen(config.getClusterPgMgenHistorySize());
              zk.setData(pg.getPath(), pgM.toBytes(), -1);
              pg.setPersistentData(pgM);
          } catch (Exception e) {
              throw new MgmtZooKeeperException(
                      "Clean mgen history of " + pg + " fail, "
                              + e.getMessage());
          }
      }
docs: /*
  When all PGSes in a PG are green, it is able to
  clean mgen-history of PG to prevent history from growing
  too long to cause slow operations.