Skip to content

Commit

Permalink
1.Config migrate executor times
Browse files Browse the repository at this point in the history
2. history comparation optimize
  • Loading branch information
shiyiyue1102 committed Dec 18, 2024
1 parent f3356a6 commit 220a6f3
Show file tree
Hide file tree
Showing 9 changed files with 273 additions and 272 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.alibaba.nacos.common.utils.StringUtils;
import com.alibaba.nacos.config.server.constant.Constants;
import com.alibaba.nacos.config.server.model.ConfigHistoryInfo;
import com.alibaba.nacos.config.server.model.ConfigHistoryInfoPair;
import com.alibaba.nacos.config.server.model.ConfigInfoWrapper;
import com.alibaba.nacos.config.server.paramcheck.ConfigDefaultHttpParamExtractor;
import com.alibaba.nacos.core.paramcheck.ExtractorManager;
Expand Down Expand Up @@ -102,25 +101,6 @@ public ConfigHistoryInfo getConfigHistoryInfo(@RequestParam("dataId") String dat
return historyService.getConfigHistoryInfo(dataId, group, tenant, nid);
}

/**
* Query the detailed configuration history information pair, including the original version and the updated version. notes:
*
* @param nid history_config_info nid
* @param dataId dataId @since 2.0.3
* @param group groupId @since 2.0.3
* @param tenant tenantId @since 2.0.3
* @return history config info
* @since 2.0.3 add {@link Secured}, dataId, groupId and tenant for history config permission check.
*/
@GetMapping(value = "/pair")
@Secured(action = ActionTypes.READ, signType = SignType.CONFIG)
public ConfigHistoryInfoPair getConfigHistoryInfoPair(@RequestParam("dataId") String dataId,
@RequestParam("group") String group,
@RequestParam(value = "tenant", required = false, defaultValue = StringUtils.EMPTY) String tenant,
@RequestParam(value = "nid") Long nid) throws AccessException {
return historyService.getConfigHistoryInfoPair(dataId, group, tenant, nid);
}

/**
* Query previous config history information. notes:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.alibaba.nacos.common.utils.StringUtils;
import com.alibaba.nacos.config.server.constant.Constants;
import com.alibaba.nacos.config.server.model.ConfigHistoryInfo;
import com.alibaba.nacos.config.server.model.ConfigHistoryInfoDetail;
import com.alibaba.nacos.config.server.model.ConfigInfoWrapper;
import com.alibaba.nacos.config.server.paramcheck.ConfigDefaultHttpParamExtractor;
import com.alibaba.nacos.core.paramcheck.ExtractorManager;
Expand Down Expand Up @@ -112,6 +113,27 @@ public Result<ConfigHistoryInfo> getConfigHistoryInfo(@RequestParam("dataId") St
return Result.success(configHistoryInfo);
}


/**
* Query the detailed configuration history information pair, including the original version and the updated version. notes:
*
* @param nid history_config_info nid
* @param dataId dataId @since 2.0.3
* @param group groupId @since 2.0.3
* @param tenant tenantId @since 2.0.3
* @return history config info
* @since 2.0.3 add {@link Secured}, dataId, groupId and tenant for history config permission check.
*/
@GetMapping(value = "/detail")
@Secured(action = ActionTypes.READ, signType = SignType.CONFIG)
public Result<ConfigHistoryInfoDetail> getConfigHistoryInfoDetail(@RequestParam("dataId") String dataId,
@RequestParam("group") String group,
@RequestParam(value = "namespaceId", required = false, defaultValue = StringUtils.EMPTY) String namespaceId,
@RequestParam(value = "nid") Long nid) throws AccessException {
return Result.success(historyService.getConfigHistoryInfoDetail(dataId, group, namespaceId, nid));
}


/**
* Query previous config history information. notes:
*
Expand Down
Loading

0 comments on commit 220a6f3

Please sign in to comment.