Skip to content

Commit

Permalink
add src_user support for config remove request
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunrisea committed Jul 25, 2024
1 parent 159a4f1 commit 762da57
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public ConfigRemoveResponse handle(ConfigRemoveRequest configRemoveRequest, Requ
String dataId = configRemoveRequest.getDataId();
String group = configRemoveRequest.getGroup();
String tag = configRemoveRequest.getTag();
String srcUser = configRemoveRequest.getAdditionParam("src_user");

try {
ParamUtils.checkTenant(tenant);
Expand All @@ -79,11 +80,10 @@ public ConfigRemoveResponse handle(ConfigRemoveRequest configRemoveRequest, Requ

String clientIp = meta.getClientIp();
if (StringUtils.isBlank(tag)) {
configInfoPersistService.removeConfigInfo(dataId, group, tenant, clientIp, null);
configInfoPersistService.removeConfigInfo(dataId, group, tenant, clientIp, srcUser);
} else {
persistEvent = ConfigTraceService.PERSISTENCE_EVENT_TAG + "-" + tag;

configInfoTagPersistService.removeConfigInfoTag(dataId, group, tenant, tag, clientIp, null);
configInfoTagPersistService.removeConfigInfoTag(dataId, group, tenant, tag, clientIp, srcUser);
}
final Timestamp time = TimeUtils.getCurrentTime();
ConfigTraceService.logPersistenceEvent(dataId, group, tenant, null, time.getTime(), clientIp, persistEvent,
Expand Down

0 comments on commit 762da57

Please sign in to comment.