Skip to content

Commit d5b977e

Browse files
committed
Removed check on execution status on consistency date/time check. Dirty reads need to be taken into consideration when setting waits on new load windows.
1 parent 1b6cd84 commit d5b977e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

020_DIRECT_Framework/Direct_Framework/Direct_Framework.sqlproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
<Folder Include="Reference_Databases" />
7171
</ItemGroup>
7272
<ItemGroup>
73-
<Build Include="Functions\omd.GetConsistencyDateTime.sql" />
7473
<Build Include="Functions\omd.GetDependency.sql" />
7574
<Build Include="Functions\omd.GetModuleLoadWindowDateTime.sql" />
7675
<Build Include="Functions\omd.GetModuleLoadWindowIdentifier.sql" />
@@ -145,6 +144,7 @@
145144
<Build Include="Stored Procedures\omd.CreateLoadWindow.sql" />
146145
<Build Include="Functions\omd.GetModuleAreaByModuleId.sql" />
147146
<Build Include="Stored Procedures\omd.InsertIntoEventLog.sql" />
147+
<Build Include="Stored Procedures\omd.GetConsistencyDateTime.sql" />
148148
</ItemGroup>
149149
<ItemGroup>
150150
<PostDeploy Include="Scripts\Script.PostDeployment.sql" />

020_DIRECT_Framework/Direct_Framework/Stored Procedures/GetConsistencyDateTime.sql renamed to 020_DIRECT_Framework/Direct_Framework/Stored Procedures/omd.GetConsistencyDateTime.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,13 @@ BEGIN
316316
SET @localSqlStatement = 'SELECT @localSourceMaxDateTime=COALESCE(MAX(LOAD_DATETIME),''1900-01-01'')' +
317317
'FROM '+@localDataObjectSource+' sdo '+
318318
'JOIN omd.MODULE_INSTANCE modinst ON sdo.module_instance_id=modinst.MODULE_INSTANCE_ID '+
319-
'WHERE modinst.EXECUTION_STATUS_CODE=''S'' ' +
319+
'WHERE 1=1 '+
320+
'--AND modinst.EXECUTION_STATUS_CODE=''S'' ' +
320321
'AND LOAD_DATETIME <= '''+CONVERT(VARCHAR(100),@MeasurementDateTime)+''''
321322

323+
-- Commented out EXECUTION_STATUS_CODE line because uncommitted rows should also be evaluated to prevent gaps in the load windows.
324+
-- Otherwise, status changes made to 'S' later on may be left out of the selection.
325+
322326
IF @Debug = 'Y'
323327
PRINT @localSqlStatement;
324328

0 commit comments

Comments
 (0)