Very good Kelly,
Since you introduced 2 new options, you need to adopt
suite/falcon/r/falcon_options.result and also falcon_options2.result.
Vlad
> -----Original Message-----
> From: Kelly Long [mailto:klong@stripped]
> Sent: Monday, July 07, 2008 4:41 PM
> To: commits@stripped
> Subject: bzr commit into mysql-6.0-falcon branch (klong:2726)
>
> #At file:///FC/MYSQL/wa-2008-BZR/lcl/mysql-6.0-falcon-cmdline-on-off/
>
> 2726 Kelly Long 2008-07-07
> Added command line options to turn off sector cache and super
> nodes
> modified:
> storage/falcon/Cache.cpp
> storage/falcon/IndexPage.cpp
> storage/falcon/StorageParameters.h
>
> === modified file 'storage/falcon/Cache.cpp'
> --- a/storage/falcon/Cache.cpp 2008-06-06 19:20:10 +0000
> +++ b/storage/falcon/Cache.cpp 2008-07-07 14:40:27 +0000
> @@ -75,7 +75,11 @@ Cache::Cache(Database *db, int pageSz, i
> pageWriter = NULL;
> hashTable = new Bdb* [hashSz];
> memset (hashTable, 0, sizeof (Bdb*) * hashSize);
> - sectorCache = new SectorCache(sectorCacheSize /
> SECTOR_BUFFER_SIZE, pageSize);
> + if(falcon_use_sectorcache)
> + sectorCache = new SectorCache(sectorCacheSize /
> SECTOR_BUFFER_SIZE, pageSize);
> + else
> + sectorCache = NULL;
> +
> uint64 n = ((uint64) pageSize * numberBuffers + cacheHunkSize -
> 1) / cacheHunkSize;
> numberHunks = (int) n;
> bufferHunks = new char* [numberHunks];
> @@ -142,7 +146,8 @@ Cache::~Cache()
> delete [] bdbs;
> delete [] ioThreads;
> delete flushBitmap;
> - delete sectorCache;
> + if(falcon_use_sectorcache)
> + delete sectorCache;
>
> if (bufferHunks)
> {
> @@ -259,8 +264,10 @@ Bdb* Cache::fetchPage(Dbb *dbb, int32 pa
>
> Priority priority(database->ioScheduler);
> priority.schedule(PRIORITY_MEDIUM);
> - //dbb->readPage(bdb);
> - sectorCache->readPage(bdb);
> + if(falcon_use_sectorcache)
> + sectorCache->readPage(bdb);
> + else
> + dbb->readPage(bdb);
> priority.finished();
> #ifdef HAVE_PAGE_NUMBER
> ASSERT(bdb->buffer->pageNumber == pageNumber);
> @@ -524,7 +531,8 @@ void Cache::writePage(Bdb *bdb, int type
>
> try
> {
> - sectorCache->writePage(bdb);
> + if(falcon_use_sectorcache)
> + sectorCache->writePage(bdb);
> dbb->writePage(bdb, type);
> }
> catch (SQLException& exception)
> @@ -795,7 +803,8 @@ void Cache::ioThread(void)
>
bdb->incrementUseCount(ADD_HISTORY);
> sync.unlock();
> bdb->addRef(Shared
> COMMA_ADD_HISTORY);
> - sectorCache->writePage(bdb);
> + if(falcon_use_sectorcache)
> +
sectorCache->writePage(bdb);
>
> bdb->syncWrite.lock(NULL,
> Exclusive);
> bdb->ioThreadNext = bdbList;
>
> === modified file 'storage/falcon/IndexPage.cpp'
> --- a/storage/falcon/IndexPage.cpp 2008-06-17 17:41:54 +0000
> +++ b/storage/falcon/IndexPage.cpp 2008-07-07 14:40:27 +0000
> @@ -1419,6 +1419,14 @@ Btn* IndexPage::getEnd(void)
> return (Btn*) ((UCHAR*) this + length);
> }
>
> +#define PARAMETER_UINT(_name, _text, _min, _default, _max, _flags,
> _update_function) \
> + extern uint falcon_##_name;
> +#define PARAMETER_BOOL(_name, _text, _default, _flags,
> _update_function) \
> + extern char falcon_##_name;
> +#include "StorageParameters.h"
> +#undef PARAMETER_UINT
> +#undef PARAMETER_BOOL
> +
> /* During node insertion, check whether supernode should be added at
> insertion point */
> bool IndexPage::checkAddSuperNode(int pageSize, IndexNode* node,
> IndexKey *indexKey,
> int recordNumber, int offset, bool
> *makeNextSuper)
> @@ -1428,6 +1436,9 @@ bool IndexPage::checkAddSuperNode(int pa
> if (makeNextSuper)
> *makeNextSuper = false;
>
> + if(!falcon_use_supernodes)
> + return false;
> +
> if (insertionPoint == nodes)
> {
> // Make supernode at the following node, if the
>
> === modified file 'storage/falcon/StorageParameters.h'
> --- a/storage/falcon/StorageParameters.h 2008-07-03 11:24:12 +0000
> +++ b/storage/falcon/StorageParameters.h 2008-07-07 14:40:27 +0000
> @@ -29,6 +29,8 @@ PARAMETER_UINT(serial_log_block_size, "M
> PARAMETER_UINT(serial_log_buffers, "The number of buffers allocated
> for Falcon serial log.", 10, 20, 32768, 0x0200, NULL)
> PARAMETER_UINT(serial_log_priority, "Whether or not serial log has
> write priority over other writes.", 0, 1, 1, 0, NULL)
> PARAMETER_BOOL(use_deferred_index_hash, "Use Deferred Index hash
> lookup", 0, 0, NULL)
> -PARAMETER_BOOL(support_xa, "Enable XA two phase commit", 0, 0x0200,
> NULL)
> +PARAMETER_BOOL(support_xa, "Enable XA two phase commit", 0, 0x0200,
> NULL)
> +PARAMETER_BOOL(use_supernodes, "Use supernodes in Falcon index", 1,
> 0x0200, NULL)
> +PARAMETER_BOOL(use_sectorcache, "Use sector cache", 1, 0x0200, NULL)
>
> // #define PARAMETER_BOOL(name, text, default, flags, update_function)
>
>
> --
> MySQL Code Commits Mailing List
> For list archives: http://lists.mysql.com/commits
> To unsubscribe:
> http://lists.mysql.com/commits?unsub=1