smengcl commented on code in PR #4950:
URL: https://github.com/apache/ozone/pull/4950#discussion_r1244554370
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/DBCheckpointServlet.java:
##########
@@ -145,28 +149,29 @@ private void
generateSnapshotCheckpoint(HttpServletRequest request,
}
DBCheckpoint checkpoint = null;
- try {
- boolean flush = false;
- String flushParam =
- request.getParameter(OZONE_DB_CHECKPOINT_REQUEST_FLUSH);
- if (StringUtils.isNotEmpty(flushParam)) {
- flush = Boolean.parseBoolean(flushParam);
- }
- List<String> receivedSstList = new ArrayList<>();
- List<String> excludedSstList = new ArrayList<>();
- String[] sstParam = isFormData ?
- parseFormDataParameters(request) : request.getParameterValues(
- OZONE_DB_CHECKPOINT_REQUEST_TO_EXCLUDE_SST);
- if (sstParam != null) {
- receivedSstList.addAll(
- Arrays.stream(sstParam)
- .filter(s -> s.endsWith(ROCKSDB_SST_SUFFIX))
- .distinct()
- .collect(Collectors.toList()));
- LOG.info("Received excluding SST {}", receivedSstList);
- }
+ boolean flush = false;
+ String flushParam =
+ request.getParameter(OZONE_DB_CHECKPOINT_REQUEST_FLUSH);
+ if (StringUtils.isNotEmpty(flushParam)) {
+ flush = Boolean.parseBoolean(flushParam);
+ }
+ List<String> receivedSstList = new ArrayList<>();
+ List<String> excludedSstList = new ArrayList<>();
+ String[] sstParam = isFormData ?
+ parseFormDataParameters(request) : request.getParameterValues(
+ OZONE_DB_CHECKPOINT_REQUEST_TO_EXCLUDE_SST);
+ if (sstParam != null) {
+ receivedSstList.addAll(
+ Arrays.stream(sstParam)
+ .filter(s -> s.endsWith(ROCKSDB_SST_SUFFIX))
+ .distinct()
+ .collect(Collectors.toList()));
+ LOG.info("Received excluding SST {}", receivedSstList);
+ }
+
+ try (BootstrapStateHandler.Lock lock = getBootstrapStateLock().lock()) {
Review Comment:
```suggestion
try (BootstrapStateHandler.Lock lock = getBootstrapStateLock().lock()) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]