Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(auth): use batch flush & async way to output log #1448

Merged
merged 4 commits into from
May 18, 2021

Conversation

imbajin
Copy link
Member

@imbajin imbajin commented May 13, 2021

More perf details refer to doc, here are some points, for log4j2:

  1. change appender to RandomAccessFile to improve perf (default is BufferedOutputStream)
  2. change to not flush immediately (default is true)
  3. use bigger (512K) buffer size (default is 4k)
  4. use (LMAX Disruptor) async way to improve log perf (default is sync)
  5. separate audit log & server log to keep sever log clean & readable
  6. use simple layout format for audit log
  7. enable auto reload log config after 60s without restart process
  8. enable non-gc mode (TODO)

Others:

  1. use StringBuilder to reduce about 9% cost for audit log

More details refer to [doc](xx), here are some points:
1. change log4j2 appender  to `RandomAccessFile` to improve perf (default is BufferedOutputStream)
2. change log4j2 to not flush immediately  (default is true)
3. use bigger (512K) buffer size (default is 4k)
4. use (LMAX Disruptor) async way to improve log perf (default is sync)
5. separate audit log & server log to keep sever log clean & readable
6. use simple layout format for audit log
7. use `StringBuilder` to reduce about `9%` cost for audit log
8. record mysql connection url info for user issue
@codecov
Copy link

codecov bot commented May 14, 2021

Codecov Report

Merging #1448 (71f5275) into master (de81038) will increase coverage by 2.55%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1448      +/-   ##
============================================
+ Coverage     59.68%   62.24%   +2.55%     
- Complexity     5715     5861     +146     
============================================
  Files           381      381              
  Lines         32139    32147       +8     
  Branches       4504     4504              
============================================
+ Hits          19183    20009     +826     
+ Misses        10968    10085     -883     
- Partials       1988     2053      +65     
Impacted Files Coverage Δ Complexity Δ
.../java/com/baidu/hugegraph/auth/ResourceObject.java 55.17% <0.00%> (-21.02%) 7.00 <0.00> (ø)
...va/com/baidu/hugegraph/task/ServerInfoManager.java 71.34% <0.00%> (-2.25%) 52.00% <0.00%> (ø%)
...ain/java/com/baidu/hugegraph/task/TaskManager.java 70.50% <0.00%> (-1.44%) 27.00% <0.00%> (ø%)
...a/com/baidu/hugegraph/backend/query/Condition.java 78.83% <0.00%> (+0.36%) 32.00% <0.00%> (ø%)
.../baidu/hugegraph/backend/query/ConditionQuery.java 86.40% <0.00%> (+0.40%) 106.00% <0.00%> (+1.00%)
.../backend/store/cassandra/CassandraSessionPool.java 57.14% <0.00%> (+1.02%) 11.00% <0.00%> (ø%)
...n/java/com/baidu/hugegraph/api/graph/BatchAPI.java 27.41% <0.00%> (+1.61%) 0.00% <0.00%> (ø%)
...egraph/backend/store/cassandra/CassandraShard.java 52.77% <0.00%> (+1.85%) 11.00% <0.00%> (ø%)
...du/hugegraph/backend/store/BackendSessionPool.java 80.55% <0.00%> (+2.77%) 19.00% <0.00%> (+1.00%)
...in/java/com/baidu/hugegraph/core/GraphManager.java 52.09% <0.00%> (+2.99%) 0.00% <0.00%> (ø%)
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de81038...71f5275. Read the comment docs.

<!-- Separate audit log, buffer size is 512KB -->
<RollingRandomAccessFile name="audit" fileName="logs/audit-hugegraph-server.log"
filePattern="logs/$${date:yyyy-MM}/audit-hugegraph-server-%d{yyyy-MM-dd}-%i.log"
bufferSize="524288" immediateFlush="false">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use unit like 512kb

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems it can't. There is no unit conversion inside

@imbajin imbajin requested review from Linary and zhoney May 17, 2021 13:30
javeme
javeme previously approved these changes May 17, 2021
@Linary Linary merged commit 1ede97c into master May 18, 2021
@Linary Linary deleted the enhance-log4j-perf branch May 18, 2021 05:37
@javeme javeme changed the title refact: use batch flush & async way to output log perf(auth): use batch flush & async way to output log May 20, 2021
@javeme
Copy link
Contributor

javeme commented Dec 7, 2021

some logs of v0.11 server with log-level=debug(before optimize):

"grizzly-http-server-22" #85 prio=5 os_prio=0 tid=0x00007f9345ff9800 nid=0x12095 runnable [0x00007f92345c5000]
   java.lang.Thread.State: RUNNABLE
	at java.io.FileOutputStream.writeBytes(Native Method)
	at java.io.FileOutputStream.write(FileOutputStream.java:326)
	at org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:261)
	- eliminated <0x000000035e1235c0> (a org.apache.logging.log4j.core.appender.rolling.RollingFileManager)
	at org.apache.logging.log4j.core.appender.FileManager.writeToDestination(FileManager.java:272)
	- eliminated <0x000000035e1235c0> (a org.apache.logging.log4j.core.appender.rolling.RollingFileManager)
	at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.writeToDestination(RollingFileManager.java:236)
	- eliminated <0x000000035e1235c0> (a org.apache.logging.log4j.core.appender.rolling.RollingFileManager)
	at org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:293)
	- eliminated <0x000000035e1235c0> (a org.apache.logging.log4j.core.appender.rolling.RollingFileManager)
	at org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:302)
	- locked <0x000000035e1235c0> (a org.apache.logging.log4j.core.appender.rolling.RollingFileManager)
	at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
	at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
	at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
	at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
	at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
	at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129)
	at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120)
	at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
	at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:543)
	at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
	at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
	at org.apache.logging.log4j.core.Logger.log(Logger.java:162)
	at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2190)
	at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2144)
	at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2127)
	at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2014)
	at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1883)
	at org.apache.logging.slf4j.Log4jLogger.debug(Log4jLogger.java:134)
	at com.baidu.hugegraph.backend.cache.AbstractCache.get(AbstractCache.java:89)
	at com.baidu.hugegraph.backend.cache.CachedSchemaTransaction.getSchema(CachedSchemaTransaction.java:238)
	at com.baidu.hugegraph.backend.tx.SchemaTransaction.getPropertyKey(SchemaTransaction.java:128)
	at com.baidu.hugegraph.StandardHugeGraph.propertyKey(StandardHugeGraph.java:644)
	at com.baidu.hugegraph.structure.HugeVertex.property(HugeVertex.java:426)
	at org.apache.tinkerpop.gremlin.structure.util.ElementHelper.attachProperties(ElementHelper.java:305)
	at com.baidu.hugegraph.backend.tx.GraphTransaction.constructVertex(GraphTransaction.java:613)
	at com.baidu.hugegraph.backend.tx.GraphTransaction.addVertex(GraphTransaction.java:565)
	at com.baidu.hugegraph.StandardHugeGraph.addVertex(StandardHugeGraph.java:482)
	at com.baidu.hugegraph.api.graph.VertexAPI.lambda$create$58(VertexAPI.java:120)
	at com.baidu.hugegraph.api.graph.VertexAPI$$Lambda$321/1606574196.call(Unknown Source)
	at com.baidu.hugegraph.api.API.commit(API.java:100)
	at com.baidu.hugegraph.api.graph.BatchAPI.commit(BatchAPI.java:75)
	at com.baidu.hugegraph.api.graph.VertexAPI.create(VertexAPI.java:117)
	at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
	at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:200)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
	at java.lang.Thread.run(Thread.java:745)

blocked threads:

"grizzly-http-server-35" #98 prio=5 os_prio=0 tid=0x00007f9346012000 nid=0x120a2 waiting for monitor entry [0x00007f913f7f5000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at org.apache.logging.log4j.core.appender.OutputStreamManager.writeBytes(OutputStreamManager.java:359)
	- waiting to lock <0x000000035e1235c0> (a org.apache.logging.log4j.core.appender.rolling.RollingFileManager)
	at org.apache.logging.log4j.core.layout.TextEncoderHelper.writeEncodedText(TextEncoderHelper.java:96)
	at org.apache.logging.log4j.core.layout.TextEncoderHelper.encodeText(TextEncoderHelper.java:65)
	at org.apache.logging.log4j.core.layout.StringBuilderEncoder.encode(StringBuilderEncoder.java:68)
	at org.apache.logging.log4j.core.layout.StringBuilderEncoder.encode(StringBuilderEncoder.java:32)
	at org.apache.logging.log4j.core.layout.PatternLayout.encode(PatternLayout.java:227)
	at org.apache.logging.log4j.core.layout.PatternLayout.encode(PatternLayout.java:59)
	at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:197)
	at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
	at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
	at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
	at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
	at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129)
	at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120)
	at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
	at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:543)
	at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
	at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
	at org.apache.logging.log4j.core.Logger.log(Logger.java:162)
	at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2190)
	at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2144)
	at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2127)
	at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2026)
	at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1899)
	at org.apache.logging.slf4j.Log4jLogger.debug(Log4jLogger.java:129)
	at com.baidu.hugegraph.backend.tx.AbstractTransaction.doAction(AbstractTransaction.java:390)
	at com.baidu.hugegraph.backend.tx.AbstractTransaction.doAppend(AbstractTransaction.java:376)
	at com.baidu.hugegraph.backend.tx.GraphIndexTransaction.updateIndex(GraphIndexTransaction.java:280)
	at com.baidu.hugegraph.backend.tx.GraphIndexTransaction.updateIndex(GraphIndexTransaction.java:242)
	at com.baidu.hugegraph.backend.tx.GraphIndexTransaction.updateVertexIndex(GraphIndexTransaction.java:158)
	at com.baidu.hugegraph.backend.tx.GraphTransaction.prepareAdditions(GraphTransaction.java:330)
	at com.baidu.hugegraph.backend.tx.GraphTransaction.prepareCommit(GraphTransaction.java:306)
	at com.baidu.hugegraph.backend.tx.IndexableTransaction.commit2Backend(IndexableTransaction.java:53)
	at com.baidu.hugegraph.backend.tx.AbstractTransaction.commit(AbstractTransaction.java:214)
	at com.baidu.hugegraph.backend.tx.GraphTransaction.commit(GraphTransaction.java:494)
	at com.baidu.hugegraph.StandardHugeGraph$Txs.commit(StandardHugeGraph.java:1263)
	at com.baidu.hugegraph.StandardHugeGraph$TinkerPopTransaction.doCommit(StandardHugeGraph.java:1143)
	at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.commit(AbstractTransaction.java:104)
	at com.baidu.hugegraph.StandardHugeGraph$TinkerPopTransaction.commit(StandardHugeGraph.java:1109)
	at com.baidu.hugegraph.api.API.commit(API.java:101)
	at com.baidu.hugegraph.api.graph.BatchAPI.commit(BatchAPI.java:75)
	at com.baidu.hugegraph.api.graph.VertexAPI.create(VertexAPI.java:117)
	at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
	at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:200)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
	at java.lang.Thread.run(Thread.java:745)

"grizzly-http-server-27" #90 prio=5 os_prio=0 tid=0x00007f9346003000 nid=0x1209a waiting for monitor entry [0x00007f913fffd000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.checkRollover(RollingFileManager.java:268)
	- waiting to lock <0x000000035e1235c0> (a org.apache.logging.log4j.core.appender.rolling.RollingFileManager)
	at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:311)
	at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
	at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129)
	at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120)
	at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
	at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:543)
	at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
	at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
	at org.apache.logging.log4j.core.Logger.log(Logger.java:162)
	at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2190)
	at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2144)
	at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2127)
	at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2014)
	at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1883)
	at org.apache.logging.slf4j.Log4jLogger.debug(Log4jLogger.java:134)
	at com.baidu.hugegraph.backend.cache.AbstractCache.get(AbstractCache.java:89)
	at com.baidu.hugegraph.backend.cache.CachedSchemaTransaction.getSchema(CachedSchemaTransaction.java:238)
	at com.baidu.hugegraph.backend.tx.SchemaTransaction.getPropertyKey(SchemaTransaction.java:128)
	at com.baidu.hugegraph.StandardHugeGraph.propertyKey(StandardHugeGraph.java:644)
	at com.baidu.hugegraph.HugeGraph.mapPkName2Id(HugeGraph.java:204)
	at com.baidu.hugegraph.backend.tx.GraphTransaction.constructVertex(GraphTransaction.java:604)
	at com.baidu.hugegraph.backend.tx.GraphTransaction.addVertex(GraphTransaction.java:565)
	at com.baidu.hugegraph.StandardHugeGraph.addVertex(StandardHugeGraph.java:482)
	at com.baidu.hugegraph.api.graph.VertexAPI.lambda$create$58(VertexAPI.java:120)
	at com.baidu.hugegraph.api.graph.VertexAPI$$Lambda$321/1606574196.call(Unknown Source)
	at com.baidu.hugegraph.api.API.commit(API.java:100)
	at com.baidu.hugegraph.api.graph.BatchAPI.commit(BatchAPI.java:75)
	at com.baidu.hugegraph.api.graph.VertexAPI.create(VertexAPI.java:117)
	at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
	at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:200)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
	at java.lang.Thread.run(Thread.java:745)

"grizzly-http-server-23" #86 prio=5 os_prio=0 tid=0x00007f9345ffb800 nid=0x12096 waiting for monitor entry [0x00007f92344c4000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:302)
	- waiting to lock <0x000000035e1235c0> (a org.apache.logging.log4j.core.appender.rolling.RollingFileManager)
	at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:199)
	at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
	at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
	at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:312)
	at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
	at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129)
	at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120)
	at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
	at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:543)
	at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:460)
	at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
	at org.apache.logging.log4j.core.Logger.log(Logger.java:162)
	at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2190)
	at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2144)
	at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2127)
	at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2026)
	at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1899)
	at org.apache.logging.slf4j.Log4jLogger.debug(Log4jLogger.java:129)
	at com.baidu.hugegraph.backend.tx.AbstractTransaction.doAction(AbstractTransaction.java:390)
	at com.baidu.hugegraph.backend.tx.AbstractTransaction.doInsert(AbstractTransaction.java:371)
	at com.baidu.hugegraph.backend.tx.GraphTransaction.prepareAdditions(GraphTransaction.java:328)
	at com.baidu.hugegraph.backend.tx.GraphTransaction.prepareCommit(GraphTransaction.java:306)
	at com.baidu.hugegraph.backend.tx.IndexableTransaction.commit2Backend(IndexableTransaction.java:53)
	at com.baidu.hugegraph.backend.tx.AbstractTransaction.commit(AbstractTransaction.java:214)
	at com.baidu.hugegraph.backend.tx.GraphTransaction.commit(GraphTransaction.java:494)
	at com.baidu.hugegraph.StandardHugeGraph$Txs.commit(StandardHugeGraph.java:1263)
	at com.baidu.hugegraph.StandardHugeGraph$TinkerPopTransaction.doCommit(StandardHugeGraph.java:1143)
	at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.commit(AbstractTransaction.java:104)
	at com.baidu.hugegraph.StandardHugeGraph$TinkerPopTransaction.commit(StandardHugeGraph.java:1109)
	at com.baidu.hugegraph.api.API.commit(API.java:101)
	at com.baidu.hugegraph.api.graph.BatchAPI.commit(BatchAPI.java:75)
	at com.baidu.hugegraph.api.graph.VertexAPI.create(VertexAPI.java:117)
	at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
	at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:200)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
	at java.lang.Thread.run(Thread.java:745)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants