1

我正在为 CMS 使用 jack rabbit OAK 实现,但是当我启动我的 springboot 应用程序时,我经常低于统计日志并且应用程序需要很长时间才能启动:

启动日志---

{"@timestamp":"2020-07-30T16:41:36.715+05:30","@version":1,"message":"RDBDocumentStore (1.22.3) instantiated for database PostgreSQL 10.4 (Ubuntu 10.4-2.pgdg16.04+1) (10.4), using driver: PostgreSQL JDBC Driver 42.2.2 (42.2), connecting to: jdbc:postgresql://host:1234/cms_db, properties: {datcollate=C, pg_encoding_to_char(encoding)=UTF8}, transaction isolation level: TRANSACTION_READ_COMMITTED (2), .table_nodes: id varchar(512), modified int8, hasbinary int2, deletedonce int2, modcount int8, cmodcount int8, dsize int8, data varchar(16384), bdata bytea(2147483647), version int2, sdtype int2, sdmaxrevtime int8 /* {bytea=-2, int2=5, int8=-5, varchar=12} */ /* index table_nodes_mod on public.table_nodes (modified ASC) other (#312616320, p2324089), unique index table_nodes_pkey on public.table_nodes (id ASC) other (#312616320, p8445036), index table_nodes_sdm on public.table_nodes (sdmaxrevtime ASC) other (#312616320, p2086629), index table_nodes_sdt on public.table_nodes (sdtype ASC) other (#312616320, p1877301), index table_nodes_vsn on public.table_nodes (version ASC) other (#312616320, p1901293) */","logger_name":"org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore","thread_name":"main","level":"INFO","level_value":20000}
{"@timestamp":"2020-07-30T16:41:36.715+05:30","@version":1,"message":"Tables present upon startup: [table_CLUSTERNODES, table_NODES, table_SETTINGS, table_JOURNAL]","logger_name":"org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore","thread_name":"main","level":"INFO","level_value":20000}
{"@timestamp":"2020-07-30T16:41:39.631+05:30","@version":1,"message":"Acquired (new) clusterId 773. MachineId mac:847xxb46xxxx, InstanceId D:\\cmsWorkspace\\test-cms\\cms-services","logger_name":"org.apache.jackrabbit.oak.plugins.document.ClusterNodeInfo","thread_name":"main","level":"INFO","level_value":20000}
{"@timestamp":"2020-07-30T16:41:50.256+05:30","@version":1,"message":"ChangeSetBuilder enabled and size set to maxItems: 50, maxDepth: 9","logger_name":"org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore","thread_name":"main","level":"INFO","level_value":20000}
{"@timestamp":"2020-07-30T16:41:50.256+05:30","@version":1,"message":"Initialized DocumentNodeStore with clusterNodeId: 773, updateLimit: 100000 (id: 773, startTime: 1596107498977, machineId: mac:847beb4693fb, instanceId: D:\\cmsWorkspace\\test-cms\\cms-services, pid: 11700, uuid: 4e5s7886-test-4a03-8dah-7a320f6ea72f, readWriteMode: null, leaseCheckMode: STRICT, state: ACTIVE, oakVersion: 1.22.3, formatVersion: 1.8.0, invisible: false)","logger_name":"org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore","thread_name":"main","level":"INFO","level_value":20000}
{"@timestamp":"2020-07-30T16:43:03.387+05:30","@version":1,"message":"Background update operation failed (will be retried with next run): org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: failed update of 0:/ (race?) after 10 retries","logger_name":"org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore","thread_name":"DocumentNodeStore background update thread (773)","level":"WARN","level_value":30000,"stack_trace":"org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: failed update of 0:/ (race?) after 10 retries\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.internalUpdate(RDBDocumentStore.java:1728)\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.internalCreateOrUpdate(RDBDocumentStore.java:1651)\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.findAndUpdate(RDBDocumentStore.java:603)\r\n\tat org.apache.jackrabbit.oak.plugins.document.util.LeaseCheckDocumentStoreWrapper.findAndUpdate(LeaseCheckDocumentStoreWrapper.java:141)\r\n\tat org.apache.jackrabbit.oak.plugins.document.UnsavedModifications.persist(UnsavedModifications.java:214)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.backgroundWrite(DocumentNodeStore.java:2451)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.internalRunBackgroundUpdateOperations(DocumentNodeStore.java:2102)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.runBackgroundUpdateOperations(DocumentNodeStore.java:2075)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$BackgroundUpdateOperation.execute(DocumentNodeStore.java:3251)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$NodeStoreTask.run(DocumentNodeStore.java:3220)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n"}
{"@timestamp":"2020-07-30T16:43:03.388+05:30","@version":1,"message":"Background operation failed: org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: failed update of 0:/ (race?) after 10 retries","logger_name":"org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore","thread_name":"DocumentNodeStore background update thread (773)","level":"WARN","level_value":30000,"stack_trace":"org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: failed update of 0:/ (race?) after 10 retries\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.internalUpdate(RDBDocumentStore.java:1728)\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.internalCreateOrUpdate(RDBDocumentStore.java:1651)\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.findAndUpdate(RDBDocumentStore.java:603)\r\n\tat org.apache.jackrabbit.oak.plugins.document.util.LeaseCheckDocumentStoreWrapper.findAndUpdate(LeaseCheckDocumentStoreWrapper.java:141)\r\n\tat org.apache.jackrabbit.oak.plugins.document.UnsavedModifications.persist(UnsavedModifications.java:214)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.backgroundWrite(DocumentNodeStore.java:2451)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.internalRunBackgroundUpdateOperations(DocumentNodeStore.java:2102)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.runBackgroundUpdateOperations(DocumentNodeStore.java:2075)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$BackgroundUpdateOperation.execute(DocumentNodeStore.java:3251)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$NodeStoreTask.run(DocumentNodeStore.java:3220)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n"}
{"@timestamp":"2020-07-30T16:43:25.362+05:30","@version":1,"message":"Background update operation failed (will be retried with next run): org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: failed update of 0:/ (race?) after 10 retries","logger_name":"org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore","thread_name":"DocumentNodeStore background update thread (773)","level":"WARN","level_value":30000,"stack_trace":"org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: failed update of 0:/ (race?) after 10 retries\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.internalUpdate(RDBDocumentStore.java:1728)\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.internalCreateOrUpdate(RDBDocumentStore.java:1651)\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.findAndUpdate(RDBDocumentStore.java:603)\r\n\tat org.apache.jackrabbit.oak.plugins.document.util.LeaseCheckDocumentStoreWrapper.findAndUpdate(LeaseCheckDocumentStoreWrapper.java:141)\r\n\tat org.apache.jackrabbit.oak.plugins.document.UnsavedModifications.persist(UnsavedModifications.java:214)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.backgroundWrite(DocumentNodeStore.java:2451)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.internalRunBackgroundUpdateOperations(DocumentNodeStore.java:2102)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.runBackgroundUpdateOperations(DocumentNodeStore.java:2075)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$BackgroundUpdateOperation.execute(DocumentNodeStore.java:3251)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$NodeStoreTask.run(DocumentNodeStore.java:3220)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n"}
{"@timestamp":"2020-07-30T16:43:25.363+05:30","@version":1,"message":"Background operation failed: org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: failed update of 0:/ (race?) after 10 retries","logger_name":"org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore","thread_name":"DocumentNodeStore background update thread (773)","level":"WARN","level_value":30000,"stack_trace":"org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: failed update of 0:/ (race?) after 10 retries\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.internalUpdate(RDBDocumentStore.java:1728)\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.internalCreateOrUpdate(RDBDocumentStore.java:1651)\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.findAndUpdate(RDBDocumentStore.java:603)\r\n\tat org.apache.jackrabbit.oak.plugins.document.util.LeaseCheckDocumentStoreWrapper.findAndUpdate(LeaseCheckDocumentStoreWrapper.java:141)\r\n\tat org.apache.jackrabbit.oak.plugins.document.UnsavedModifications.persist(UnsavedModifications.java:214)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.backgroundWrite(DocumentNodeStore.java:2451)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.internalRunBackgroundUpdateOperations(DocumentNodeStore.java:2102)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.runBackgroundUpdateOperations(DocumentNodeStore.java:2075)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$BackgroundUpdateOperation.execute(DocumentNodeStore.java:3251)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$NodeStoreTask.run(DocumentNodeStore.java:3220)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n"}
{"@timestamp":"2020-07-30T16:43:26.124+05:30","@version":1,"message":"Background read operations stats (read:44551 ReadStats{cacheStats:NOP, head:23104, cache:20688, diff: 3, lock:0, dispatch:0, numExternalChanges:734, externalChangesLag:55245, totalReadTime:44551})","logger_name":"org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore","thread_name":"DocumentNodeStore background read thread (773)","level":"INFO","level_value":20000}
{"@timestamp":"2020-07-30T16:43:46.433+05:30","@version":1,"message":"Background update operation failed (will be retried with next run): org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: failed update of 0:/ (race?) after 10 retries","logger_name":"org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore","thread_name":"DocumentNodeStore background update thread (773)","level":"WARN","level_value":30000,"stack_trace":"org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: failed update of 0:/ (race?) after 10 retries\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.internalUpdate(RDBDocumentStore.java:1728)\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.internalCreateOrUpdate(RDBDocumentStore.java:1651)\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.findAndUpdate(RDBDocumentStore.java:603)\r\n\tat org.apache.jackrabbit.oak.plugins.document.util.LeaseCheckDocumentStoreWrapper.findAndUpdate(LeaseCheckDocumentStoreWrapper.java:141)\r\n\tat org.apache.jackrabbit.oak.plugins.document.UnsavedModifications.persist(UnsavedModifications.java:214)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.backgroundWrite(DocumentNodeStore.java:2451)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.internalRunBackgroundUpdateOperations(DocumentNodeStore.java:2102)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.runBackgroundUpdateOperations(DocumentNodeStore.java:2075)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$BackgroundUpdateOperation.execute(DocumentNodeStore.java:3251)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$NodeStoreTask.run(DocumentNodeStore.java:3220)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n"}
{"@timestamp":"2020-07-30T16:43:46.433+05:30","@version":1,"message":"Background operation failed: org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: failed update of 0:/ (race?) after 10 retries","logger_name":"org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore","thread_name":"DocumentNodeStore background update thread (773)","level":"WARN","level_value":30000,"stack_trace":"org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: failed update of 0:/ (race?) after 10 retries\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.internalUpdate(RDBDocumentStore.java:1728)\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.internalCreateOrUpdate(RDBDocumentStore.java:1651)\r\n\tat org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.findAndUpdate(RDBDocumentStore.java:603)\r\n\tat org.apache.jackrabbit.oak.plugins.document.util.LeaseCheckDocumentStoreWrapper.findAndUpdate(LeaseCheckDocumentStoreWrapper.java:141)\r\n\tat org.apache.jackrabbit.oak.plugins.document.UnsavedModifications.persist(UnsavedModifications.java:214)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.backgroundWrite(DocumentNodeStore.java:2451)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.internalRunBackgroundUpdateOperations(DocumentNodeStore.java:2102)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.runBackgroundUpdateOperations(DocumentNodeStore.java:2075)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$BackgroundUpdateOperation.execute(DocumentNodeStore.java:3251)\r\n\tat org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$NodeStoreTask.run(DocumentNodeStore.java:3220)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n"}
{"@timestamp":"2020-07-30T16:43:53.827+05:30","@version":1,"message":"Background operation BackgroundUpdateOperation successful again","logger_name":"org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore","thread_name":"DocumentNodeStore background update thread (773)","level":"INFO","level_value":20000}
{"@timestamp":"2020-07-30T16:43:56.066+05:30","@version":1,"message":"Background read operations stats (read:28941 ReadStats{cacheStats:NOP, head:27955, cache:1, diff: 4, lock:0, dispatch:0, numExternalChanges:959, externalChangesLag:54012, totalReadTime:28941})","logger_name":"org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore","thread_name":"DocumentNodeStore background read thread (773)","level":"INFO","level_value":20000}
{"@timestamp":"2020-07-30T16:44:52.230+05:30","@version":1,"message":"Slow Query Report SQL=select MODIFIED, MODCOUNT, CMODCOUNT, HASBINARY, DELETEDONCE, VERSION, SDTYPE, SDMAXREVTIME, case when (MODCOUNT = ? and MODIFIED = ?) then null else DATA end as DATA, case when (MODCOUNT = ? and MODIFIED = ?) then null else BDATA end as BDATA from table_NODES where ID = ?; time=44158 ms;","logger_name":"org.apache.tomcat.jdbc.pool.interceptor.SlowQueryReport","thread_name":"DocumentNodeStore background read thread (773)","level":"WARN","level_value":30000}
{"@timestamp":"2020-07-30T16:44:52.454+05:30","@version":1,"message":"Background read operations stats (read:44383 ReadStats{cacheStats:NOP, head:44383, cache:0, diff: 0, lock:0, dispatch:0, numExternalChanges:0, externalChangesLag:0, totalReadTime:44383})","logger_name":"org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore","thread_name":"DocumentNodeStore background read thread (773)","level":"INFO","level_value":20000}

我在数据库中有数百万个数据(节点)。如何避免以上后台操作快速启动应用。

4

0 回答 0