Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6943

Undefined behavior of SYSCS_DIAG.ERROR_LOG_READER() when using rolling log files

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.13.1.1
    • Fix Version/s: None
    • Component/s: Services
    • Labels:
      None
    • Urgency:
      Normal

      Description

      The behavior of SYSCS_DIAG.ERROR_LOG_READER() is undefined when the engine is booted with -Dderby.stream.error.style=rollingFile. At a minimum, it should scan at least one of the rolling files. Instead, it raises an exception saying that it can't find derby.log.

      The following script shows this behavior:

      connect 'jdbc:derby:memory:db;create=true';
      
      -- correctly succeeds if using ordinary diagnostic logging
      -- INCORRECTLY RAISES 'No such file or directory' if -Dderby.stream.error.style=rollingFile is set
      SELECT count(*) FROM TABLE (SYSCS_DIAG.ERROR_LOG_READER()) AS T1;
      
      -- correctly succeeds if using ordinary diagnostic logging
      -- correctly raises 'No such file or directory' if -Dderby.stream.error.style=rollingFile is set
      SELECT count(*) FROM TABLE (SYSCS_DIAG.ERROR_LOG_READER('derby.log')) AS T1;
      
      -- correctly raises 'No such file or directory' if using ordinary logging
      -- correctly succeeds if -Dderby.stream.error.style=rollingFile is set
      SELECT count(*) FROM TABLE (SYSCS_DIAG.ERROR_LOG_READER('derby-0.log')) AS T1;
      

      We should decide on a correct behavior for SYSCS_DIAG.ERROR_LOG_READER() when the -Dderby.stream.error.style=rollingFile property is set. Here are some options:

      1) Scan all of the rolling diagnostic log files, starting at derby-0.log and
      continuing through the last in the series.

      2) Scan just the first rolling diagnostic log file.

      3) Scan just the last (current) diagnostic log file.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rhillegas Richard N. Hillegas
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: