[mapguide-commits] r7349 - in branches/2.5/MgDev: Common/MapGuideCommon/System Server/src/Core Server/src/Services/Feature
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Feb 12 05:35:17 PST 2013
Author: jng
Date: 2013-02-12 05:35:16 -0800 (Tue, 12 Feb 2013)
New Revision: 7349
Modified:
branches/2.5/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp
branches/2.5/MgDev/Common/MapGuideCommon/System/ConfigProperties.h
branches/2.5/MgDev/Server/src/Core/serverconfig.ini
branches/2.5/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp
branches/2.5/MgDev/Server/src/Services/Feature/ServerSelectFeatures.h
Log:
#2213: Make the choice of whether to use FDO Join optimization a configurable option through serverconfig.ini. This way, users can have the old GwsQueryEngine behaviour.
Modified: branches/2.5/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp
===================================================================
--- branches/2.5/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp 2013-02-12 12:08:59 UTC (rev 7348)
+++ branches/2.5/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp 2013-02-12 13:35:16 UTC (rev 7349)
@@ -280,6 +280,8 @@
const INT32 MgConfigProperties::DefaultFeatureServicePropertyDataTransactionTimerInterval = 60;
const STRING MgConfigProperties::FeatureServicePropertyFDOConnectionTimeoutCustom = L"FDOConnectionTimeoutCustom";
const STRING MgConfigProperties::DefaultFeatureServicePropertyFDOConnectionTimeoutCustom = L"OSGeo.WMS:120";
+const STRING MgConfigProperties::FeatureServicePropertyUseFdoJoinOptimization = L"UseFdoJoinOptimization";
+const bool MgConfigProperties::DefaultFeatureServicePropertyUseFdoJoinOptimization = true;
// ******************************************************************
// Mapping Service Properties
Modified: branches/2.5/MgDev/Common/MapGuideCommon/System/ConfigProperties.h
===================================================================
--- branches/2.5/MgDev/Common/MapGuideCommon/System/ConfigProperties.h 2013-02-12 12:08:59 UTC (rev 7348)
+++ branches/2.5/MgDev/Common/MapGuideCommon/System/ConfigProperties.h 2013-02-12 13:35:16 UTC (rev 7349)
@@ -351,6 +351,10 @@
static const STRING FeatureServicePropertyFDOConnectionTimeoutCustom; /// value("FDOConnectionTimeoutCustom")
static const STRING DefaultFeatureServicePropertyFDOConnectionTimeoutCustom; /// value("OSGeo.WMS:120")
+ /// Defines whether to use the FDO Join APIs for Feature Joins where applicable and supported
+ static const STRING FeatureServicePropertyUseFdoJoinOptimization; /// value("UseFdoJoinOptimization")
+ static const bool DefaultFeatureServicePropertyUseFdoJoinOptimization; /// value(true)
+
/// MAPPING SERVICE PROPERTIES SECTION -------------------------------------------------------------------------------
/// Mapping Service properties
Modified: branches/2.5/MgDev/Server/src/Core/serverconfig.ini
===================================================================
--- branches/2.5/MgDev/Server/src/Core/serverconfig.ini 2013-02-12 12:08:59 UTC (rev 7348)
+++ branches/2.5/MgDev/Server/src/Core/serverconfig.ini 2013-02-12 13:35:16 UTC (rev 7349)
@@ -270,6 +270,9 @@
# 0 < Value <= 1800
# FDOConnectionTimeoutCustom Time duration in seconds for an FDO connection
# 0 < Value <= 600
+# UseFdoJoinOptimization Determines whether to use FDO Join APIs for feature joins between
+# classes from the same Feature Source for FDO providers that support it
+# 1 = Use FDO Join APIs if possible, 0 = Fallback to GwsQueryEngine
# *****************************************************************************
CacheSize = 100
CacheTimeLimit = 86400
@@ -285,6 +288,7 @@
DataTransactionTimeout = 360
DataTransactionTimerInterval = 60
FDOConnectionTimeoutCustom = OSGeo.WMS:120
+UseFdoJoinOptimization = 1
[MappingServiceProperties]
# *****************************************************************************
Modified: branches/2.5/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp
===================================================================
--- branches/2.5/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp 2013-02-12 12:08:59 UTC (rev 7348)
+++ branches/2.5/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp 2013-02-12 13:35:16 UTC (rev 7349)
@@ -49,6 +49,7 @@
// Set a default join query batch size
m_nJoinQueryBatchSize = MgConfigProperties::DefaultFeatureServicePropertyJoinQueryBatchSize;
+ m_bUseFdoJoinOptimization = MgConfigProperties::DefaultFeatureServicePropertyUseFdoJoinOptimization;
MgConfiguration* config = MgConfiguration::GetInstance();
if(config)
@@ -63,6 +64,11 @@
MgConfigProperties::FeatureServicePropertyDataCacheSize,
m_nDataCacheSize,
MgConfigProperties::DefaultFeatureServicePropertyDataCacheSize);
+ // Get FDO Join use flag
+ config->GetBoolValue(MgConfigProperties::FeatureServicePropertiesSection,
+ MgConfigProperties::FeatureServicePropertyUseFdoJoinOptimization,
+ m_bUseFdoJoinOptimization,
+ MgConfigProperties::DefaultFeatureServicePropertyUseFdoJoinOptimization);
}
}
@@ -1556,6 +1562,10 @@
{
bool bSupported = false;
+ //If disabled on a global level, don't even bother continuing
+ if (!m_bUseFdoJoinOptimization)
+ return false;
+
MG_FEATURE_SERVICE_TRY()
//This could be qualified, so parse it to be sure
Modified: branches/2.5/MgDev/Server/src/Services/Feature/ServerSelectFeatures.h
===================================================================
--- branches/2.5/MgDev/Server/src/Services/Feature/ServerSelectFeatures.h 2013-02-12 12:08:59 UTC (rev 7348)
+++ branches/2.5/MgDev/Server/src/Services/Feature/ServerSelectFeatures.h 2013-02-12 13:35:16 UTC (rev 7349)
@@ -91,6 +91,9 @@
INT32 m_nJoinQueryBatchSize;
INT32 m_nDataCacheSize;
+ // This is the overriding flag that decides if we should test for and use the FDO Join
+ // APIs if possible
+ bool m_bUseFdoJoinOptimization;
// FDO join optimization
bool IsFunctionOnPrimaryProperty(FdoFunction* function, FdoIConnection* conn, CREFSTRING schemaName, CREFSTRING className);
More information about the mapguide-commits
mailing list