Using Trace Flags for Advanced Debugging

GemFire XD provides debug trace flags to record additional information about GemFire XD features in the log file.

GemFire XD provides these trace flags that you can use with the gemfirexd.debug.true system property to log additional details about GemFire XD behavior:
Trace flag Enables
QueryDistribution Detailed logging for distributed queries and DML statements, including information about message distribution to GemFire XD members and scan types that were opened.
StatementMatching Logging for optimizations that are related to unprepared statements.
TraceAuthentication Additional logging for GemFire XD authentication.
TraceDBSynchronizer DBSynchronizer and WAN distribution logging.
TraceClientConn Client-side connection open and close stack traces.
TraceClientStatement Client-side, basic timing logging.
TraceClientStatementMillis Client-side wall clock timing.
TraceIndex Detailed index logging.
TraceJars Logging for JAR installation, replace, and remove events.
TraceTran Detailed logging for transaction events and operations, including commit and rollback.
TraceLock_* Locking and unlocking information for all internal locks.
TraceLock_DD Logging for all DataDictionary and table locks that are acquired or released.
If you are asked to set a trace flag in a GemFire XD member for debugging purposes, do so using the gemfirexd.debug.true system property when you start a server or locator. For example, this command sets both the QueryDistribution and TraceIndex flags:
gfxd server start -J-Dgemfirexd.debug.true=QueryDistribution,TraceIndex
For applications that use the JDBC peer driver, set trace-related flags in the gemfirexd.debug.true system property before the application connects to the GemFire XD cluster. For example, this code sets traces for index and query distribution and then connects using the peer driver:
Properties props = new Properties();
props.put("gemfirexd.debug.true", "TraceIndex,QueryDistribution");
Java.sql.Connection conn = java.sql.DriverManager.getConnection("jdbc:gemfirexd:");

Client-side trace flags write additional information to the client log file, which is configured using the gemfirexd.client.log-file property.

If you need to set a trace flag in a running system, use the SYS.SET_TRACE_FLAG system procedure. The procedure sets the trace flag in all members of the distributed system, including locators. You must execute the procedure as a system user. For example:
gfxd> call sys.set_trace_flag('traceindex', 'true');
Statement executed.