Understand automatic transition with AI Streaming
- Last Updated: February 1, 2019
- 3 minute read
- OpenEdge
- Version 13.0
- Documentation
The behavior of the data in your RSB cache, when an automatic transition occurs,
is controlled by the transition property, apply-streaming-data. The apply-streaming-data property may be set to either 1 or 0. The setting
indicates the following:
apply-streaming-data=1— When the transition timeout expires, the replication agent waits for all entries in the RSB cache to be applied to the target database before continuing with auto-transition.apply-streaming-data=0— When the transition timeout expires, the replication agent discards all entries in the RSB cache and continues with auto-transition.
The apply-streaming-data property defaults to 0 unless
explicity set to 1 in the properties file. Setting the apply-streaming-data property to values other than 1 is the equivalent of
setting it to 0.
For all possible configurations of replication (one target, two target,
replication set)1, when apply-streaming-data=1, all
the data in the RSB cache is written to the target database before transition.
Auto-transition for one-target or two-targets (no replication set)
In this configuration, the agents handle data in the RSB cache with the following steps:
- The agent reaches time to transition.
- Check the
apply-streaming-datasetting.- If 1, check if the RSB cache is empty.
- Yes — initiate auto-transition, writing
this message to the log file:
Agent's RSB cache is empty. Ready for auto-transition. (19317 ) - No — reset the time to transition and return to
Step 1, after writing these messages
to the log file:
%l<num> blocks exist in RSB cache. The Agent will transition after all blocks in the RSB cache have been applied to the database. (19300) The transition time has been reset to allow for RSB cache to empty before auto transition. (19301)
- Yes — initiate auto-transition, writing
this message to the log file:
- If 0, check if the RSB cache is empty.
- Yes — initiate auto-transition, writing
this message to the log file:
Agent's RSB cache is empty. Ready for auto-transition. (19317 ) - No — initiate auto-transition, writing
this message to the log file:
Automatic transition is starting, there are up to %l<num> blocks in the RSB cache that will not be processed. (19299)
- Yes — initiate auto-transition, writing
this message to the log file:
- If 1, check if the RSB cache is empty.
Auto-transition for a two target replication set
In this configuration, the agents handle data in the RSB cache with the following steps. If at any time during the processing of the RSB cache prior to transition, the agents lose inter-agent communication, the replication set is broken and the agents transition as single agents, using the prior process.
- The local agent reaches time to transition. (Each agent acts as a local agent, communicating with the other "remote" agent.)
- Check if the RSB cache has been processed.
- Yes — Proceed to Step 3.
- No — Process the RSB cache.
Check the
apply-streaming-datasetting:- 1 — Process RSB cache
data before transition.
Check if the RSB cache is empty.
- Yes — Ping the
remote agent that the RSB cache is empty, and the local
agent is ready for transition. Write the following
message to the log file:
Agent's RSB cache is empty. Ready to transition with replication-set. (19311) - No — Ping the
remote agent that the RSB cache is not empty, the local
agent is processing the cache, and is not ready for
transition. Write the following messages to the log file
and repeat this step:
%l<num> blocks exist in RSB cache. The Agent will transition after all blocks in the RSB cache have been applied to the database. (19300) The transition time has been reset to allow for RSB cache to empty before auto transition. (19301)
- Yes — Ping the
remote agent that the RSB cache is empty, and the local
agent is ready for transition. Write the following
message to the log file:
- 0 — Do not process RSB
cache data before transition.
Check if the RSB cache is empty.
- Yes — Ping the
remote agent that RSB cache is empty and the local agent
is ready for transition. Write the following message to
the log file:
Agent's RSB cache is empty. Ready to transition with replication-set. (19311) - No — Discard the
remaining blocks in the RSB cache. Ping the remote agent
that cache is empty and the local agent is ready for
transition. Write the following message to the log
file:
Agent is ready to transition with replication-set. There are up to %l<num> blocks in the RSB cache that will not be processed.(19312)
- Yes — Ping the
remote agent that RSB cache is empty and the local agent
is ready for transition. Write the following message to
the log file:
- 1 — Process RSB cache
data before transition.
Note: When the remote agent receives a ping from the local agent, it sets its time to transition to the current time to begin handling of its own RSB cache. The remote agent writes the following message to its log file:Remote agent has signaled that it processed its RSB data and is ready for auto-transition. (19316) - Check communications status with the remote agent.
Has the remote agent sent a message indicating that it has completed processing its RSB cache and is ready to transition?
- No — Ping the remote agent to confirm it is still
connected. Reset the time to transition, and return to Step 1 after writing the following message to
the log file:
Waiting for remote agent to process its RSB data and signal that it is ready to auto-transition.(19314) - Yes — Proceed to Step 4.
- No — Ping the remote agent to confirm it is still
connected. Reset the time to transition, and return to Step 1 after writing the following message to
the log file:
- Confirm that both agents are ready to proceed with auto-transition.
Both agents write the following message to their log file:
Both agents in the replication-set have processed their RSB data and are ready for auto-transition.(19315)The priority agent initiates transition, and the other agent waits to be notified by the priority agent that transition processing is proceeding.