The comment in this test is that lock escalation is a problem for the test, not that Derby does something incorrect by doing the lock escalation. Lock escalation is handled fine by derby, it is just that this test expects only row locks. The issue with this test is that it uses multiple connections and expects them in some cases to be working on the same table while the other thread holds locks. If lock escalation happens then one thread gets a table level lock and the
other thread can't do what the test expects.

Mayuresh Nirhali (JIRA) wrote:
[ http://issues.apache.org/jira/browse/DERBY-606?page=comments#action_12450785 ] Mayuresh Nirhali commented on DERBY-606:
----------------------------------------

I looked at the OnlineCompressTest and realized that to reproduce this case, 
the simplest way is to increase the number of rows added to the table in one of 
the existing testcases. However, I see a following comment in the testcase,

<snip>
     * 4000 rows  - reasonable number of pages to test out, still 1 alloc page
     *
     * note that row numbers greater than 4000 may lead to lock escalation
* issues, if queries like "delete from x" are used to delete all the * rows.
</snip>

This is very relevant to the testcase which I would like to add and so, would 
like to know the Lock Escalation issue here. Has anyone seen this kind of issue 
before ? any pointers ??

The repro attached to the bug has almost similar testcase, I have not seen any 
problems with that so far. So, it might be that the Lock Escalation issue has 
already been fixed. (I did not find any related JIRA for this though). Can 
someone please confirm this ?? I can update the comments if that problem has 
been fixed.

Thanks



SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE fails on (very) large tables
--------------------------------------------------------------------

               Key: DERBY-606
               URL: http://issues.apache.org/jira/browse/DERBY-606
           Project: Derby
        Issue Type: Bug
        Components: Store
  Affects Versions: 10.1.1.0
       Environment: Java 1.5.0_04 on Windows Server 2003 Web Edition
          Reporter: Jeffrey Aguilera
       Assigned To: Mayuresh Nirhali
           Fix For: 10.3.0.0

       Attachments: A606Test.java, derby606_v1.diff


SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE fails with one of the following error 
messages when applied to a very large table (>2GB):
Log operation null encounters error writing itself out to the log stream, this 
could be caused by an errant log operation or internal log buffer full due to 
excessively large log operation. SQLSTATE: XJ001: Java exception: ': 
java.io.IOException'.
or
The exception 'java.lang.ArrayIndexOutOfBoundsException' was thrown while 
evaluating an expression. SQLSTATE: XJ001: Java exception: ': 
java.lang.ArrayIndexOutOfBoundsException'.
In either case, no entry is written to the console log or to derby.log.



Reply via email to