diff --git a/broker/src/main/resources/log4j2.xml b/broker/src/main/resources/log4j2.xml new file mode 100644 index 000000000..fd36e616e --- /dev/null +++ b/broker/src/main/resources/log4j2.xml @@ -0,0 +1,73 @@ + + + + + + ${sys:user.home}${sys:file.separator}logs${sys:file.separator}rocketmqlogs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/metadata-jdbc/src/main/java/com/automq/rocketmq/metadata/HikariCPDataSourceFactory.java b/metadata-jdbc/src/main/java/com/automq/rocketmq/metadata/HikariCPDataSourceFactory.java index 44034cb7a..e43553000 100644 --- a/metadata-jdbc/src/main/java/com/automq/rocketmq/metadata/HikariCPDataSourceFactory.java +++ b/metadata-jdbc/src/main/java/com/automq/rocketmq/metadata/HikariCPDataSourceFactory.java @@ -31,7 +31,7 @@ public void setProperties(Properties properties) { synchronized (HikariCPDataSourceFactory.class) { if (null == dataSource) { HikariConfig config = new HikariConfig(properties); - config.setMaximumPoolSize(10); + config.setMaximumPoolSize(20); config.setAutoCommit(false); dataSource = new HikariDataSource(config); } diff --git a/store/src/main/java/com/automq/rocketmq/store/DataStoreFacade.java b/store/src/main/java/com/automq/rocketmq/store/DataStoreFacade.java index 78b916988..217dd73e1 100644 --- a/store/src/main/java/com/automq/rocketmq/store/DataStoreFacade.java +++ b/store/src/main/java/com/automq/rocketmq/store/DataStoreFacade.java @@ -21,11 +21,17 @@ import com.automq.rocketmq.store.api.LogicQueueManager; import com.automq.rocketmq.store.api.S3ObjectOperator; import com.automq.rocketmq.store.api.StreamStore; +import com.google.common.base.Stopwatch; import java.util.List; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.TimeUnit; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class DataStoreFacade implements DataStore { + private static final Logger LOGGER = LoggerFactory.getLogger(DataStoreFacade.class); + private final StreamStore streamStore; private final S3ObjectOperator s3ObjectOperator; private final LogicQueueManager logicQueueManager; @@ -49,6 +55,11 @@ public CompletableFuture trimStream(long streamId, long offset) { @Override public CompletableFuture> batchDeleteS3Objects(List objectIds) { - return s3ObjectOperator.delete(objectIds); + Stopwatch stopwatch = Stopwatch.createStarted(); + CompletableFuture> future = s3ObjectOperator.delete(objectIds); + return future.thenApply(list -> { + LOGGER.info("batchDeleteS3Objects costs {}ms", stopwatch.elapsed(TimeUnit.MILLISECONDS)); + return list; + }); } }