aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Farner <wfar...@apache.org>
Subject Re: Review Request 42845: Enable H2 logging to slf4j.
Date Wed, 27 Jan 2016 18:21:12 GMT


> On Jan. 27, 2016, 9:56 a.m., Bill Farner wrote:
> > Are you sure this patch does what you want?  When i apply the patch and run the
scheduler in vagrant, the `h2database` logger shows as level `WARN` in `/logconfig`.  When
at level `DEBUG`, there is likely far more verbose you want - full SQL for every query, and
reporting of calls to every JDBC API method call implemented by h2.
> > e.g. for a single task fetch:
> > ```
> > D0127 17:43:36.163 [AsyncProcessor-2, TraceWriterAdapter:63] jdbc[7]
> > /**/conn6.getAutoCommit();
> > D0127 17:43:36.163 [AsyncProcessor-2, TraceWriterAdapter:63] jdbc[7]
> > /**/conn6.getAutoCommit();
> > D0127 17:43:36.164 [AsyncProcessor-2, TraceWriterAdapter:63] jdbc[7]
> > /**/conn6.commit();
> > D0127 17:43:36.164 [AsyncProcessor-2, TraceWriterAdapter:63] jdbc[7]
> > /**/conn6.commit();
> > I0127 17:43:36.164 [AsyncProcessor-2, TraceWriterAdapter:66] jdbc[7]
> > /*SQL */COMMIT;
> > I0127 17:43:36.164 [AsyncProcessor-2, TraceWriterAdapter:66] jdbc[7]
> > /*SQL */COMMIT;
> > D0127 17:43:36.164 [AsyncProcessor-2, TraceWriterAdapter:63] jdbc[7]
> > /**/conn6.getAutoCommit();
> > I0127 17:43:36.164 [TaskReconciler-0, TraceWriterAdapter:66] jdbc[6]
> > /*SQL l:124 #:1 t:685*/SELECT\n      id,\n      name,\n      port\n    FROM task_ports\n
   WHERE task_row_id = (SELECT id FROM tasks WHERE task_id = ?) {1: '1453916569060-vagrant
> > -test-http_example-1-3a77ea53-59cf-424b-9c1e-6ac15bfd3b64'};
> > D0127 17:43:36.164 [AsyncProcessor-2, TraceWriterAdapter:63] jdbc[7]
> > /**/conn6.getAutoCommit();
> > I0127 17:43:36.164 [TaskReconciler-0, TraceWriterAdapter:66] jdbc[6]
> > /*SQL l:124 #:1 t:685*/SELECT\n      id,\n      name,\n      port\n    FROM task_ports\n
   WHERE task_row_id = (SELECT id FROM tasks WHERE task_id = ?) {1: '1453916569060-vagrant
> > -test-http_example-1-3a77ea53-59cf-424b-9c1e-6ac15bfd3b64'};
> > D0127 17:43:36.165 [AsyncProcessor-2, TraceWriterAdapter:63] jdbc[7]
> > /**/conn6.setAutoCommit(true);
> > D0127 17:43:36.165 [TaskReconciler-0, TraceWriterAdapter:63] jdbc[6]
> > /**/ResultSet rs6250 = prep5733.getResultSet();
> > I0127 17:43:36.165 [SlaStat-0, TraceWriterAdapter:66] jdbc[10]
> > /*SQL l:124 #:1 t:98*/SELECT\n      id,\n      name,\n      port\n    FROM task_ports\n
   WHERE task_row_id = (SELECT id FROM tasks WHERE task_id = ?) {1: '1453843867483-vagrant-test-http_example_docker-0-ae563d91-5960-416d-95ac-156990334ff4'};
> > D0127 17:43:36.165 [AsyncProcessor-2, TraceWriterAdapter:63] jdbc[7]
> > /**/conn6.setAutoCommit(true);
> > D0127 17:43:36.165 [TaskReconciler-0, TraceWriterAdapter:63] jdbc[6]
> > /**/ResultSet rs6250 = prep5733.getResultSet();
> > I0127 17:43:36.165 [SlaStat-0, TraceWriterAdapter:66] jdbc[10]
> > /*SQL l:124 #:1 t:98*/SELECT\n      id,\n      name,\n      port\n    FROM task_ports\n
   WHERE task_row_id = (SELECT id FROM tasks WHERE task_id = ?) {1: '1453843867483-vagrant-test-http_example_docker-0-ae563d91-5960-416d-95ac-156990334ff4'};
> > D0127 17:43:36.166 [AsyncProcessor-2, TraceWriterAdapter:63] jdbc[7]
> > /**/conn6.commit();
> > ```

Please ignore the above - the convoluted knobs in h2 to enable this mode threw me.  Taking
another look.


- Bill


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42845/#review116602
-----------------------------------------------------------


On Jan. 26, 2016, 9:37 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42845/
> -----------------------------------------------------------
> 
> (Updated Jan. 26, 2016, 9:37 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> On a test cluster with DbTaskStore enabled there are several lines in the log that look
like:
> ````
> 2016-01-26 13:07:14 jdbc[15]: exception
> ````
> There is no other information with these lines. This is a result of setting `TRACE_LEVEL_SYSTEM_OUT`
to `1` for H2. This will print out the error message but not the associated throwable: https://github.com/h2database/h2database/blob/a932268843ac84c7a665e427167ff2eb291d6b8e/h2/src/main/org/h2/message/TraceSystem.java#L228
> 
> The SLF4J implementation of tracing in H2 does not suffer from this restriction.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java 36c462ac86cc605bd86bfc31c2f962a315099a02

>   src/main/resources/logback.xml faf0dbc94dea536a944be18810a7f330d4c94dee 
> 
> Diff: https://reviews.apache.org/r/42845/diff/
> 
> 
> Testing
> -------
> 
> Set the level to debug initially and observed extra output in Vagrant.
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message