From: Date: June 26 2008 3:08pm Subject: commit into mysql-6.0-falcon branch (lars-erik.bjork:2720) Bug#36805 List-Archive: http://lists.mysql.com/commits/48566 X-Bug: 36805 Message-Id: <200806261308.m5QD8caY019972@dm-norway-02.uk.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit #At bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-6.0-falcon/ 2720 lars-erik.bjork@stripped 2008-06-26 bug#36805 - falcon_index_chill_threshold and falcon_record_chill_threshold have values in MB falcon_index_chill_threshold and falcon_record_chill_threshold accept a value in megabytes. This is non-standard with respect to the rest of the server options, prevents from setting the variables to lower than 1mb, which prevents testing of the chill/thaw mechanism and prevents the user from using the KB, MB and GB modifiers provided by server. falcon_index_chill_threshold and falcon_record_chill_threshold are now changed to accept a value in bytes. The tests falcon_options and falcon_options2 are also changed to work accordingly. modified: mysql-test/suite/falcon/r/falcon_options.result mysql-test/suite/falcon/r/falcon_options2.result mysql-test/suite/falcon/t/falcon_options.test storage/falcon/Configuration.cpp storage/falcon/StorageParameters.h storage/falcon/ha_falcon.cpp per-file comments: mysql-test/suite/falcon/r/falcon_options.result Changed to use bytes instead of mbytes for falcon_record_chill_threshold and falcon_index_chill_threshold. mysql-test/suite/falcon/r/falcon_options2.result Changed to use bytes instead of mbytes for falcon_record_chill_threshold and falcon_index_chill_threshold. mysql-test/suite/falcon/t/falcon_options.test Changed to use bytes instead of mbytes for falcon_record_chill_threshold and falcon_index_chill_threshold. storage/falcon/Configuration.cpp No longer expect values in mbytes and do therefore not multiply to convert to bytes which is the internal representation. storage/falcon/StorageParameters.h Changed the upper and lower boundaries as well as the default values for the parameters accordingly. Both parameters now have a lower boundary of 1 byte instead of 1 MB. storage/falcon/ha_falcon.cpp No longer expect values in Mbytes and do therefore not multiply to convert to bytes. === modified file 'mysql-test/suite/falcon/r/falcon_options.result' --- a/mysql-test/suite/falcon/r/falcon_options.result 2008-06-23 10:22:43 +0000 +++ b/mysql-test/suite/falcon/r/falcon_options.result 2008-06-26 13:08:32 +0000 @@ -7,7 +7,7 @@ falcon_debug_trace 0 falcon_direct_io 1 falcon_gopher_threads 5 -falcon_index_chill_threshold 4 +falcon_index_chill_threshold 4194304 falcon_initial_allocation 0 falcon_io_threads 2 falcon_large_blob_threshold 160000 @@ -15,7 +15,7 @@ falcon_max_transaction_backlog 150 falcon_page_cache_size 4194304 falcon_page_size 4096 -falcon_record_chill_threshold 5 +falcon_record_chill_threshold 5242880 falcon_record_memory_max 262144000 falcon_record_scavenge_floor 50 falcon_record_scavenge_threshold 67 @@ -77,15 +77,15 @@ @@GLOBAL.falcon_record_memory_max 536870912 SELECT @@GLOBAL.falcon_index_chill_threshold INTO @previous_falcon_index_chill_threshold; -SET GLOBAL falcon_index_chill_threshold = 1024; +SET GLOBAL falcon_index_chill_threshold = 1073741824; SELECT @@GLOBAL.falcon_index_chill_threshold; @@GLOBAL.falcon_index_chill_threshold -1024 +1073741824 SELECT @@GLOBAL.falcon_record_chill_threshold INTO @previous_falcon_record_chill_threshold; -SET GLOBAL falcon_record_chill_threshold = 1024; +SET GLOBAL falcon_record_chill_threshold = 1073741824; SELECT @@GLOBAL.falcon_record_chill_threshold; @@GLOBAL.falcon_record_chill_threshold -1024 +1073741824 SELECT * FROM INFORMATION_SCHEMA.global_variables WHERE variable_name LIKE 'falcon%'; VARIABLE_NAME VARIABLE_VALUE @@ -96,7 +96,7 @@ FALCON_DEBUG_TRACE 0 FALCON_DIRECT_IO 1 FALCON_GOPHER_THREADS 5 -FALCON_INDEX_CHILL_THRESHOLD 1024 +FALCON_INDEX_CHILL_THRESHOLD 1073741824 FALCON_INITIAL_ALLOCATION 0 FALCON_IO_THREADS 2 FALCON_LARGE_BLOB_THRESHOLD 160000 @@ -104,7 +104,7 @@ FALCON_MAX_TRANSACTION_BACKLOG 10001 FALCON_PAGE_CACHE_SIZE 4194304 FALCON_PAGE_SIZE 4096 -FALCON_RECORD_CHILL_THRESHOLD 1024 +FALCON_RECORD_CHILL_THRESHOLD 1073741824 FALCON_RECORD_MEMORY_MAX 536870912 FALCON_RECORD_SCAVENGE_FLOOR 50 FALCON_RECORD_SCAVENGE_THRESHOLD 67 === modified file 'mysql-test/suite/falcon/r/falcon_options2.result' --- a/mysql-test/suite/falcon/r/falcon_options2.result 2008-06-23 10:22:43 +0000 +++ b/mysql-test/suite/falcon/r/falcon_options2.result 2008-06-26 13:08:32 +0000 @@ -8,7 +8,7 @@ FALCON_DEBUG_TRACE 0 FALCON_DIRECT_IO 1 FALCON_GOPHER_THREADS 5 -FALCON_INDEX_CHILL_THRESHOLD 4 +FALCON_INDEX_CHILL_THRESHOLD 4194304 FALCON_INITIAL_ALLOCATION 0 FALCON_IO_THREADS 2 FALCON_LARGE_BLOB_THRESHOLD 160000 @@ -16,7 +16,7 @@ FALCON_MAX_TRANSACTION_BACKLOG 150 FALCON_PAGE_CACHE_SIZE 4194304 FALCON_PAGE_SIZE 4096 -FALCON_RECORD_CHILL_THRESHOLD 5 +FALCON_RECORD_CHILL_THRESHOLD 5242880 FALCON_RECORD_MEMORY_MAX 262144000 FALCON_RECORD_SCAVENGE_FLOOR 50 FALCON_RECORD_SCAVENGE_THRESHOLD 67 @@ -51,7 +51,7 @@ 5 SELECT @@falcon_index_chill_threshold; @@falcon_index_chill_threshold -4 +4194304 SELECT @@falcon_initial_allocation; @@falcon_initial_allocation 0 @@ -75,7 +75,7 @@ 4096 SELECT @@falcon_record_chill_threshold; @@falcon_record_chill_threshold -5 +5242880 SELECT @@falcon_record_memory_max; @@falcon_record_memory_max 262144000 === modified file 'mysql-test/suite/falcon/t/falcon_options.test' --- a/mysql-test/suite/falcon/t/falcon_options.test 2008-03-11 16:15:47 +0000 +++ b/mysql-test/suite/falcon/t/falcon_options.test 2008-06-26 13:08:32 +0000 @@ -43,11 +43,11 @@ SELECT @@GLOBAL.falcon_record_memory_max; SELECT @@GLOBAL.falcon_index_chill_threshold INTO @previous_falcon_index_chill_threshold; -SET GLOBAL falcon_index_chill_threshold = 1024; +SET GLOBAL falcon_index_chill_threshold = 1073741824; SELECT @@GLOBAL.falcon_index_chill_threshold; SELECT @@GLOBAL.falcon_record_chill_threshold INTO @previous_falcon_record_chill_threshold; -SET GLOBAL falcon_record_chill_threshold = 1024; +SET GLOBAL falcon_record_chill_threshold = 1073741824; SELECT @@GLOBAL.falcon_record_chill_threshold; === modified file 'storage/falcon/Configuration.cpp' --- a/storage/falcon/Configuration.cpp 2008-05-14 18:39:57 +0000 +++ b/storage/falcon/Configuration.cpp 2008-06-26 13:08:32 +0000 @@ -119,8 +119,8 @@ allocationExtent = falcon_allocation_extent; serialLogWindows = falcon_serial_log_buffers; pageCacheSize = falcon_page_cache_size; - indexChillThreshold = falcon_index_chill_threshold * ONE_MB; - recordChillThreshold = falcon_record_chill_threshold * ONE_MB; + indexChillThreshold = falcon_index_chill_threshold; + recordChillThreshold = falcon_record_chill_threshold; maxTransactionBacklog = falcon_max_transaction_backlog; useDeferredIndexHash = (falcon_use_deferred_index_hash != 0); === modified file 'storage/falcon/StorageParameters.h' --- a/storage/falcon/StorageParameters.h 2008-03-11 16:15:47 +0000 +++ b/storage/falcon/StorageParameters.h 2008-06-26 13:08:32 +0000 @@ -17,13 +17,13 @@ PARAMETER_UINT(debug_trace, "Falcon debug trace trigger.", 0, 0, INT_MAX, 0, NULL) PARAMETER_UINT(direct_io, "Whether Falcon should use O_DIRECT.", 0, 1, 2, 0, NULL) PARAMETER_UINT(gopher_threads, "Number of Falcon gopher threads", 1, 5, 20, 0, NULL) -PARAMETER_UINT(index_chill_threshold, "Mbytes of pending index data that is 'frozen' to the Falcon serial log.", 1, 4, 1024, 0, &updateIndexChillThreshold) +PARAMETER_UINT(index_chill_threshold, "Bytes of pending index data that is 'frozen' to the Falcon serial log.", 1, 4*1024*1024, 1024*1024*1024, 0, &updateIndexChillThreshold) PARAMETER_UINT(io_threads, "Number of Falcon I/O threads", 2, 2, 20, 0, NULL) PARAMETER_UINT(large_blob_threshold, "Threshold for large blobs", 0, 160000, INT_MAX, 0, NULL) PARAMETER_UINT(lock_wait_timeout, "Transaction lock time period (seconds)", 0, 50, INT_MAX, 0, NULL) PARAMETER_UINT(max_transaction_backlog, "Maximum number of backlogged transactions.", 1, 150, 1000000, 0, NULL) PARAMETER_UINT(page_size, "The page size used when creating a Falcon tablespace.", 1024, 4096, 32768, 0x0200, NULL) -PARAMETER_UINT(record_chill_threshold, "Mbytes of pending record data that is 'frozen' to the Falcon serial log.", 1, 5, 1024, 0, &updateRecordChillThreshold) +PARAMETER_UINT(record_chill_threshold, "Bytes of pending record data that is 'frozen' to the Falcon serial log.", 1, 5*1024*1024, 1024*1024*1024, 0, &updateRecordChillThreshold) PARAMETER_UINT(record_scavenge_floor, "A percentage of falcon_record_memory_threshold that defines the amount of record data that will remain in the record cache after a scavenge run.", 10, 50, 90, 0x2000, &StorageInterface::updateRecordScavengeFloor) PARAMETER_UINT(record_scavenge_threshold, "The percentage of falcon_record_memory_max that will cause the scavenger thread to start scavenging records from the record cache.", 10, 67, 100, 0x2000, &StorageInterface::updateRecordScavengeThreshold) PARAMETER_UINT(serial_log_block_size, "Minimum block size for serial log.", 0, 0, 4096, 0, NULL) === modified file 'storage/falcon/ha_falcon.cpp' --- a/storage/falcon/ha_falcon.cpp 2008-06-23 10:22:43 +0000 +++ b/storage/falcon/ha_falcon.cpp 2008-06-26 13:08:32 +0000 @@ -3384,7 +3384,7 @@ { falcon_index_chill_threshold = *(uint *)save; if(storageHandler) - storageHandler->setIndexChillThreshold(falcon_index_chill_threshold * 1024 * 1024); + storageHandler->setIndexChillThreshold(falcon_index_chill_threshold); } static void updateRecordChillThreshold(MYSQL_THD thd, @@ -3393,7 +3393,7 @@ { falcon_record_chill_threshold = *(uint *)save; if(storageHandler) - storageHandler->setRecordChillThreshold(falcon_record_chill_threshold * 1024 * 1024); + storageHandler->setRecordChillThreshold(falcon_record_chill_threshold); } void StorageInterface::updateRecordMemoryMax(MYSQL_THD thd, struct st_mysql_sys_var* variable, void* var_ptr, const void* save)