public class st_reclaim_longcol extends BaseTest
Modifier and Type | Field and Description |
---|---|
private static int |
SHORT_BLOB_SIZE
Test reclaim of a single deleted blob on a page with non-deleted rows.
|
(package private) static boolean |
verbose |
SPACE_INFO_ESTIMSPACESAVING, SPACE_INFO_IS_INDEX, SPACE_INFO_NUM_ALLOC, SPACE_INFO_NUM_FREE, SPACE_INFO_NUM_UNFILLED, SPACE_INFO_NUMCOLS, SPACE_INFO_PAGE_SIZE
Constructor and Description |
---|
st_reclaim_longcol() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] argv) |
private static void |
setup()
Create the base table.
|
void |
test1(java.sql.Connection conn,
int blob_size,
int num_rows) |
void |
test2(java.sql.Connection conn,
int blob_size,
int work_size,
int total_work)
DERBY-1913
test2 is too sensitive to machine speed and background thread
processing.
|
void |
testList(java.sql.Connection conn) |
private void |
wait_for_max_allocated(java.sql.Connection conn,
java.lang.String test_name,
int alloc_wait_count)
wait for background thread to convert allocated pages to free pages
Wait until the total number of allocated pages is <= alloc_wait_count.
|
beginTest, checkAllConsistency, checkConsistency, createDebugSystemProcedures, createTable, endTest, executeQuery, get_lock_info, getSpaceInfo, log, logError, testProgress, total_pages
static boolean verbose
private static final int SHORT_BLOB_SIZE
loops through inserting alternating long and short column rows resulting in pages with 1 short and one long. Deletes the long column row and tests that space from the long column row is reclaimed even though there are non-deleted rows on the page.
private static void setup() throws java.lang.Exception
java.lang.Exception
public void test1(java.sql.Connection conn, int blob_size, int num_rows) throws java.sql.SQLException
java.sql.SQLException
public void test2(java.sql.Connection conn, int blob_size, int work_size, int total_work) throws java.sql.SQLException
test2 is too sensitive to machine speed and background thread processing. It would be better suited as a long running stress test if someone has the inclination. Disabling this test for now. test1 covers the original intent to test that blobs are immediately marked for post commit on individual delete, rather than waiting for all rows on a page to be deleted.
java.sql.SQLException
private void wait_for_max_allocated(java.sql.Connection conn, java.lang.String test_name, int alloc_wait_count) throws java.sql.SQLException
Wait until the total number of allocated pages is <= alloc_wait_count. The expectation is that the test has performed some deletes and committed allowing the background task converted empty allocated pages with only deleted rows into free pages. On an machine with some idle processors only a short wait should be necessary. But on machines with lots of load, possibly other tests running just sleeping does not guarantee background thread an immediate chance to run. Without this extra wait some nightly's were seeing failures, see DERBY-1913.
java.sql.SQLException
public void testList(java.sql.Connection conn) throws java.sql.SQLException
public static void main(java.lang.String[] argv) throws java.lang.Throwable
java.lang.Throwable
Apache Derby V10.11 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.