[
https://issues.apache.org/jira/browse/DERBY-5445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121414#comment-13121414
]
Mamta A. Satoor commented on DERBY-5445:
----------------------------------------
For some reason, my commit 1179374 for this jira has not yet been assoicated
here. The commit had added means to stress test identity columns under
concurrent thread. The commit comments are as follows
DERBY--5445 (Enhance existing concurrency test to stress sequence generators to
also stress identity columns)
DERBY-4565 added a concurrency test to stress sequence generation. I am making
simple modifications to that test to add identity column stress testing. Based
on a command line parameter, the test will either do sequence generation
testing or identity column testing. If no parameter is specified, it will
default to doing sequene generation testing.
The test already takes number of parameters. One of those parameters is load
options parameter. Load option parameter is indicated by -load_opts on command
line and it is followed by a comma separated list of sub-parameters. An eg of
load option parameter is as follows
-load_opts
debugging=1,numberOfGenerators=5,tablesPerGenerator=10,insertsPerTransaction=100
I am adding another pair to the comma separated sub-parameters,namely
identityTest=aNumber. If identityTest is 1, then the test will do identity
column stress testing. For any other value for identityTest, the test will do
sequence generation testing. If the user doesn't specify identityTest in load
options, the test will perform sequence generation testing.
eg of asking the test to do identity column testing
java org.apache.derbyTesting.perf.clients.Runner -driver
org.apache.derby.jdbc.EmbeddedDriver -init -load seq_gen -load_opts
debugging=1,numberOfGenerators=5,tablesPerGenerator=10,insertsPerTransaction=100,identityTest=1
-gen b2b -threads 10
Two possible way of asking the test to do sequence generation
testing(identityTest set to a value other than 1 or identityTest is not
specified)
java org.apache.derbyTesting.perf.clients.Runner -driver
org.apache.derby.jdbc.EmbeddedDriver -init -load seq_gen -load_opts
debugging=1,numberOfGenerators=5,tablesPerGenerator=10,insertsPerTransaction=100,identityTest=2
-gen b2b -threads 10
OR
java org.apache.derbyTesting.perf.clients.Runner -driver
org.apache.derby.jdbc.EmbeddedDriver -init -load seq_gen -load_opts
debugging=1,numberOfGenerators=5,tablesPerGenerator=10,insertsPerTransaction=100
-gen b2b -threads 10
When I run the test for identity columns, I can consistently see it running
into derby lock time out with nested sequencec contention error while trying to
get current identity value and advancing(this is what we want to achieve from
the test ie that it is able to stress the functionality enough to run into
contention while trying to get next range for identity columns.) Additionally,
there are some lock time out errors raised by store while trying to update
system catalog(this is expected too because of multiple threads simulataneously
trying to do inserts into a table with identity column). I also in my codeline
reverted to changes before DERBY-5426 (DERBY-4526 is Improve the error raised
by too much contention on a sequence/identity.) was fixed and saw sequence
contention errors (without the lock time out error encapsulation).
> Enhance existing concurrency test to stress sequence generators to also
> stress identity columns
> -----------------------------------------------------------------------------------------------
>
> Key: DERBY-5445
> URL: https://issues.apache.org/jira/browse/DERBY-5445
> Project: Derby
> Issue Type: Task
> Components: Test
> Affects Versions: 10.8.2.2, 10.9.0.0
> Reporter: Mamta A. Satoor
> Assignee: Mamta A. Satoor
>
> DERBY-4565 added a concurrency test for sequence generators to test the
> possible race condition for allocating a new range of pre-allocated numbers
> for the sequence. I have been looking at enhancing that test to provide
> similar test for identity columns. I plan to add another command line
> parameter to the test which will run the concurrency test to stress identity
> column generator.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira