List:Commits« Previous MessageNext Message »
From:U-ROWVWADEjas Date:August 21 2007 4:00pm
Subject:bk commit into 6.0-falcon tree (jas:1.2678)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0-falcon repository of . When  does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-08-21 11:49:42-04:00, jas@rowvwade. +11 -0
  Added support for configuration parameter "falcon_disable_fsync".

  storage/falcon/Configuration.cpp@stripped, 2007-08-21 11:49:31-04:00, jas@rowvwade. +4 -0
    Added support for configuration parameter "falcon_disable_fsync".

  storage/falcon/Configuration.h@stripped, 2007-08-21 11:49:31-04:00, jas@rowvwade. +1 -0
    Added support for configuration parameter "falcon_disable_fsync".

  storage/falcon/Connection.cpp@stripped, 2007-08-21 11:49:31-04:00, jas@rowvwade. +6 -0
    Added support for configuration parameter "falcon_disable_fsync".

  storage/falcon/Connection.h@stripped, 2007-08-21 11:49:32-04:00, jas@rowvwade. +1 -0
    Added support for configuration parameter "falcon_disable_fsync".

  storage/falcon/Database.cpp@stripped, 2007-08-21 11:49:32-04:00, jas@rowvwade. +15 -6
    Added support for configuration parameter "falcon_disable_fsync".

  storage/falcon/Database.h@stripped, 2007-08-21 11:49:32-04:00, jas@rowvwade. +1 -0
    Added support for configuration parameter "falcon_disable_fsync".

  storage/falcon/MemMgr.cpp@stripped, 2007-08-21 11:49:33-04:00, jas@rowvwade. +3 -2
    Trivial formatting change.

  storage/falcon/StorageHandler.cpp@stripped, 2007-08-21 11:49:33-04:00, jas@rowvwade. +6 -0
    Added support for configuration parameter "falcon_disable_fsync".

  storage/falcon/StorageHandler.h@stripped, 2007-08-21 11:49:34-04:00, jas@rowvwade. +2 -0
    Added support for configuration parameter "falcon_disable_fsync".

  storage/falcon/ha_falcon.cpp@stripped, 2007-08-21 11:49:34-04:00, jas@rowvwade. +17 -25
    Added support for configuration parameter "falcon_disable_fsync".

  storage/falcon/ha_falcon.h@stripped, 2007-08-21 11:49:35-04:00, jas@rowvwade. +2 -0
    Added support for configuration parameter "falcon_disable_fsync".

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jas
# Host:	rowvwade.
# Root:	D:/MySQL/mysql-5.1-falcon

--- 1.44/storage/falcon/StorageHandler.cpp	2007-08-21 12:00:04 -04:00
+++ 1.45/storage/falcon/StorageHandler.cpp	2007-08-21 12:00:04 -04:00
@@ -969,3 +969,9 @@
 		{
 		}
 }
+
+void StorageHandler::setSyncDisable(int value)
+{
+	if (dictionaryConnection)
+		dictionaryConnection->setSyncDisable(value);
+}

--- 1.21/storage/falcon/StorageHandler.h	2007-08-21 12:00:04 -04:00
+++ 1.22/storage/falcon/StorageHandler.h	2007-08-21 12:00:04 -04:00
@@ -96,6 +96,8 @@
 	virtual void		getTransactionSummaryInfo(InfoTable* infoTable);
 	virtual void		getTablesInfo(InfoTable* infoTable);
 
+	virtual void		setSyncDisable(int value);
+
 	StorageDatabase*	getStorageDatabase(const char* dbName, const char* path);
 	void				remove(StorageConnection* storageConnection);
 	void				closeDatabase(const char* path);

--- 1.20/storage/falcon/Configuration.cpp	2007-08-21 12:00:04 -04:00
+++ 1.21/storage/falcon/Configuration.cpp	2007-08-21 12:00:04 -04:00
@@ -40,6 +40,7 @@
 extern uint			falcon_index_chill_threshold;
 extern uint			falcon_record_chill_threshold;
 extern uint			falcon_max_transaction_backlog;
+extern char			falcon_disable_fsync;
 #else
 #define CONFIG_FILE	"netfraserver.conf"
 #endif
@@ -67,6 +68,7 @@
 	indexChillThreshold		= falcon_index_chill_threshold * ONE_MB;
 	recordChillThreshold	= falcon_record_chill_threshold * ONE_MB;
 	maxTransactionBacklog	= falcon_max_transaction_backlog;
+	disableFsync			= falcon_disable_fsync != 0;
 #else
 	recordMemoryLower		= 0;
 	recordMemoryUpper		= getMemorySize(RECORD_MEMORY_UPPER);
@@ -75,7 +77,9 @@
 	indexChillThreshold		= 4 * ONE_MB;
 	recordChillThreshold	= 5 * ONE_MB;
 	maxTransactionBacklog	= MAX_TRANSACTION_BACKLOG;
+	disableFsync			= false;
 #endif
+
 	javaInitialAllocation = 0;
 	javaSecondaryAllocation = 0;
 	maxThreads = 0;

--- 1.9/storage/falcon/Configuration.h	2007-08-21 12:00:04 -04:00
+++ 1.10/storage/falcon/Configuration.h	2007-08-21 12:00:04 -04:00
@@ -53,6 +53,7 @@
 	int			maxThreads;
 	uint		maxTransactionBacklog;
 	bool		schedulerEnabled;
+	bool		disableFsync;
 };
 
 #endif // !defined(AFX_CONFIGURATION_H__FE192389_82EE_4E37_BA07_19A71BCFF487__INCLUDED_)

--- 1.18/storage/falcon/Connection.cpp	2007-08-21 12:00:04 -04:00
+++ 1.19/storage/falcon/Connection.cpp	2007-08-21 12:00:04 -04:00
@@ -1839,3 +1839,9 @@
 	
 	return buffer;
 }
+
+void Connection::setSyncDisable(int value)
+{
+	if (database)
+		database->setSyncDisable(value);
+}

--- 1.14/storage/falcon/Connection.h	2007-08-21 12:00:04 -04:00
+++ 1.15/storage/falcon/Connection.h	2007-08-21 12:00:04 -04:00
@@ -149,6 +149,7 @@
 	virtual void		dropDatabase();
 	virtual int			getTransactionIsolation();
 	virtual void		setTransactionIsolation  (int level);
+	virtual void		setSyncDisable(int value);
 
 	int32			getNextHandle();
 	void			deleteRepositoryBlob (const char *schema, const char *repositoryName, int volume, int64 blobId);

--- 1.88/storage/falcon/Database.cpp	2007-08-21 12:00:04 -04:00
+++ 1.89/storage/falcon/Database.cpp	2007-08-21 12:00:04 -04:00
@@ -2303,13 +2303,16 @@
 
 void Database::sync(void)
 {
-	time_t before = DateTime::getNow();
-	dbb->sync();
-	tableSpaceManager->sync();
-	time_t delta = DateTime::getNow() - before;
+	if (!configuration->disableFsync)
+		{
+		time_t before = DateTime::getNow();
+		dbb->sync();
+		tableSpaceManager->sync();
+		time_t delta = DateTime::getNow() - before;
 
-	if (delta)
-		Log::debug("Disk sync time: %d seconds\n", delta);
+		if (delta)
+			Log::debug("Disk sync time: %d seconds\n", delta);
+		}
 }
 
 void Database::preUpdate(bool memCheck)
@@ -2336,3 +2339,9 @@
 			}
 }
 
+
+void Database::setSyncDisable(int value)
+{
+	if (configuration)
+		configuration->disableFsync = value != 0;
+}

--- 1.38/storage/falcon/Database.h	2007-08-21 12:00:04 -04:00
+++ 1.39/storage/falcon/Database.h	2007-08-21 12:00:04 -04:00
@@ -286,6 +286,7 @@
 	void preUpdate(bool memCheck = true);
 	void checkMemory(void);
 	
+	void setSyncDisable(int value);
 };
 
 #endif // !defined(AFX_DATABASE_H__5EC961D1_A406_11D2_AB5B_0000C01D2301__INCLUDED_)

--- 1.29/storage/falcon/MemMgr.cpp	2007-08-21 12:00:04 -04:00
+++ 1.30/storage/falcon/MemMgr.cpp	2007-08-21 12:00:04 -04:00
@@ -813,8 +813,9 @@
 		{
 		if (*block)
 			currentMemory -= (*block)->length;
-	free (block);
-}
+			
+		free (block);
+	}
 }
 
 void MemMgr::releaseRaw(MemSmallHunk *block)

--- 1.206/storage/falcon/ha_falcon.cpp	2007-08-21 12:00:05 -04:00
+++ 1.207/storage/falcon/ha_falcon.cpp	2007-08-21 12:00:05 -04:00
@@ -47,18 +47,8 @@
 #endif
 
 static const uint LOAD_AUTOCOMMIT_RECORDS = 10000;
-
-#if defined(_WIN32) && MYSQL_VERSION_ID < 0x50100
-#define IS_SLASH(c)	(c == '/' || c == '\\')
-#else
-#define IS_SLASH(c)	(c == '/')
-#endif
-
-#define FALCON_TEMPORARY	"/falcon_temporary"
-
-//static const int MAX_FALCON_KEY_LENGTH = (MAX_INDEX_KEY_LENGTH * RUN / (RUN - 1));
-
 static const char falcon_hton_name[] = "Falcon";
+
 static const char *falcon_extensions[] = {
 	".fts",
 	".fl1",
@@ -67,7 +57,6 @@
 };
 
 static StorageHandler	*storageHandler;
-//static NfsPluginHandler *pluginHandler;
 
 unsigned long long		falcon_min_record_memory;
 unsigned long long		falcon_max_record_memory; // = 20 * 1024 * 1024;
@@ -77,6 +66,7 @@
 char*					falcon_serial_log_dir;
 int						falcon_debug_mask;
 my_bool					falcon_debug_server;
+my_bool					falcon_disable_fsync;
 FILE					*falcon_log_file;
 uint					falcon_index_chill_threshold;
 uint					falcon_record_chill_threshold;
@@ -339,23 +329,10 @@
 	activeBlobs = NULL;
 	freeBlobs = NULL;
 	errorText = NULL;
-	//dbName = NULL;
 	
 	if (table_arg)
 		{
 		recordLength = table_arg->reclength;
-		
-		/***
-		switch (table_arg->tmp_table)
-			{
-			case INTERNAL_TMP_TABLE:
-				tempTable = true;
-				break;
-			
-			default:
-				tempTable = false;
-			}
-		***/
 		tempTable = false;
 		}
 }
@@ -2783,11 +2760,25 @@
 	//uint newFalconRecordChillThreshold = *((uint *) save);
 }
 
+
+void StorageInterface::updateFsyncDisable(MYSQL_THD thd, struct st_mysql_sys_var* variable, void *var_ptr, void *save)
+{
+	falcon_disable_fsync = *(my_bool*) save;
+	
+	if (storageHandler)
+		storageHandler->setSyncDisable(falcon_disable_fsync);
+}
+
 static MYSQL_SYSVAR_BOOL(debug_server, falcon_debug_server,
   PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
   "Enable Falcon debug code.",
   NULL, NULL, FALSE);
 
+static MYSQL_SYSVAR_BOOL(disable_fsync, falcon_disable_fsync,
+  PLUGIN_VAR_NOCMDARG, // | PLUGIN_VAR_READONLY,
+  "Disable periodic fsync().",
+  NULL, StorageInterface::updateFsyncDisable, FALSE);
+
 static MYSQL_SYSVAR_STR(serial_log_dir, falcon_serial_log_dir,
   PLUGIN_VAR_RQCMDARG| PLUGIN_VAR_READONLY | PLUGIN_VAR_MEMALLOC,
   "Falcon serial log file directory.",
@@ -2854,6 +2845,7 @@
 
 static struct st_mysql_sys_var* falconVariables[]= {
 	MYSQL_SYSVAR(debug_server),
+	MYSQL_SYSVAR(disable_fsync),
 	MYSQL_SYSVAR(serial_log_dir),
 	MYSQL_SYSVAR(debug_mask),
 	MYSQL_SYSVAR(max_record_memory),

--- 1.46/storage/falcon/ha_falcon.h	2007-08-21 12:00:05 -04:00
+++ 1.47/storage/falcon/ha_falcon.h	2007-08-21 12:00:05 -04:00
@@ -127,6 +127,8 @@
 	static int		commit_by_xid(handlerton* hton, XID* xid);
 	static int		rollback_by_xid(handlerton* hton, XID* xid);
 
+	static void		updateFsyncDisable(MYSQL_THD thd, struct st_mysql_sys_var* variable, void *var_ptr, void *save);
+
 	/* Turn off table cache for now */
 
 	//uint8 table_cache_type() { return HA_CACHE_TBL_TRANSACT; }
Thread
bk commit into 6.0-falcon tree (jas:1.2678)U-ROWVWADEjas21 Aug