Fix query continues profiling policies error when the policy is already in the cache (#13155)
This commit is contained in:
parent
da491cb063
commit
33c0e8e67b
|
|
@ -5,6 +5,7 @@
|
|||
#### OAP Server
|
||||
|
||||
* BanyanDB: Support `hot/warm/cold` stages configuration.
|
||||
* Fix query continues profiling policies error when the policy is already in the cache.
|
||||
|
||||
#### UI
|
||||
|
||||
|
|
|
|||
|
|
@ -112,6 +112,12 @@ public class ContinuousProfilingServiceHandler extends ContinuousProfilingServic
|
|||
}
|
||||
}
|
||||
|
||||
// if no service need to check from DB then return empty
|
||||
if (serviceIdList.isEmpty()) {
|
||||
sendEmptyCommands(responseObserver);
|
||||
return;
|
||||
}
|
||||
|
||||
// query the policies which not in the cache
|
||||
final List<ContinuousProfilingPolicy> queriedFromDB = policyDAO.queryPolicies(serviceIdList);
|
||||
for (ContinuousProfilingPolicy dbPolicy : queriedFromDB) {
|
||||
|
|
@ -294,4 +300,4 @@ public class ContinuousProfilingServiceHandler extends ContinuousProfilingServic
|
|||
private static class PolicyWrapper {
|
||||
final ContinuousProfilingPolicy policy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue