- Function Name
-
The name of this function varies by DBMS.
On Oracle CMSs, the function is:
GET_DAY_ALIGN_STUB
On SQL Server CMSs, the function is:
DAY_ALIGN_STUB
- Purpose
-
This function acts as a switch, and can be customized to return either true or false. The default to retain compatibility with older versions is to return false. So by default, Review Queue does not operate in 'day align mode'. The sections below illustrates the behavioral difference between Review Queue operating in 'day align mode' and 'non day align mode'.
- Default
-
false/0
On Oracle, this function returns a Boolean value of true or false, so it needs to return true to switch to 'day align mode'.
However, on SQL Server there is no support for Boolean datatypes, so it needs to return a non zero (1 by convention) to switch to 'day align mode'.
- Day Align Mode
-
- When the Review Queue selects the events that are candidates to be placed onto the queue, it attempts to select every event from the calendar day on which the upper bound of the next run would occur. This means that, by default, if the sample size is set to 1 day then each run of Review Queue will select all the events from the next calendar day as candidates, and not just those that are within the 24 hour window that follows chronologically from the highest event of the previous run. This means that the event window is used to select events from the Review Queue will not 'slip' over time.
- When there are insufficient events to satisfy the sample size (default 1 day), the Review Queue will simply process those events that are available. It will not abandon without processing.
- Non Day Align Mode
-
- When the Review Queue selects the events that are candidates to be placed onto the Review Queue, it attempts to select every event that lies within the window defined by the last event processed by the previous run plus the sample size. It makes no attempt to align this window on any boundary, and simply selects the sample size as defined by GET_SAMPLE_SIZE_STUB.
- When there are insufficient events to satisfy the sample size (default 1 day), the Review Queue will ABANDON, and not process any events until there is are sufficient events available to satisfy the sample size. Note that from release 12.0, when this occurs an entry gets written to WGN3QUEUESTATE to indicate that the Review Queue was abandoned due to insufficient events being available to process.
- Examples
-
- Using the default sample size of 1 day, consider that on Dayx the Review Queue ran and processed events up to and including an event that occurred at 23:45:20pm. When the Review Queue runs on Dayx+1, the highest event that occurred on that day occurred is at 23:58:00pm (slightly more than 24 hrs ahead of the highest from Dayx), and on Dayx+1 there also exists an event that occurred at 23:45:20pm (exactly 24 hrs of the highest from Dayx). If the Review Queue is operating in 'day align mode' then it will process events on Dayx+1 up to and including the one that occurred at 23:58:00pm. Conversely, in 'non align mode' it will process events on Dayx+1 only up to and including the one that occurred at 23:45:20pm, but those that occurred between 23:45:20pm and 23:58:00pm will not be processed until the Review Queue runs on Dayx+2.
- Using the default sample size of 1 day, consider that on Dayx the Review Queue ran and processed events up to and including an event that occurred at 23:45:20pm. When the Review Queue runs on Dayx+1, the highest event that occurred in the system occurred at 09:00:00am on Dayx+1 (so there is only around 9:15 hrs worth of candidate events, which is less than the 1 day as required by the sample size). If the Review Queue is operating in 'day align mode' then it will successfully process events on Dayx+1 up to and including the one that occurred at 09:00:00am. Conversely, in 'non align mode' it will abandon and process no events because it insists on processing a full sample of events.