473,544 Members | 1,787 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Prevent Infinite Looping in Q Replication

RdR
Hi,

Has anyone encountered infinite looping in Q Replication? This happens when
I have a source DB2 table A going to a target DB2 table B, it also happens
that the samne target table B is replicated back to source table A (true
bi-directional replication scenario). Once I start replication on a master
to master scenario the changes in A gets replicated to B but that change
gets replicated back to A and so on creating an infinite loop. Is there
something I can define to prevent this from happening.

Also, any collision detection mechanisms I can use?

Thanks,

RdR
Nov 12 '05 #1
6 2337
With my limited exposure,

Do you see any errors in the IBMQREP_EXCEPTI ONS?

Also, check if commit interval will be of any help.

Nov 12 '05 #2
RdR
Hi Hikums,

What happens is the change I made in A gets replicated to B but it goes back
to A ( B see it as a legitimate change - which technically it is a
legitimate change) because they were setup to replicate like a Master to
Master type of setup. I was hoping I can use something to identify that a
change was made in A so that when B APPLYs that change, it will not send it
back to A. I think I can do that by adding a new column and use that column
as a filter to identify that it originated in A. A trigger to populate that
cna do it but first, it is intrusive, meaning I have to change my table
structures, and secondly, adding a trigger will add to CPU usage and
latency.

For commitment control, the commit interval will not work because what I am
really watching out for is what happens if the change happens at the same
time on both A and B. I need something to compare the before and after
images and make sure that they match before I do an update or a delete.

Thanks,

RdR
<hi****@gmail.c om> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
With my limited exposure,

Do you see any errors in the IBMQREP_EXCEPTI ONS?

Also, check if commit interval will be of any help.

Nov 12 '05 #3
In the case of bidirectional Replication changes occur between tables
on two servers. Changes that are made to one copy of a table are
replicated to a second copy of that table, and changes that are made to
the second copy are replicated back to the first copy. This is the
intention. you can think of it as a backup server.

The choices that you make for conflict rules and conflict actions
affect the behavior of how rows are applied. The conflict rules
determine how much of the data is checked to detect a conflict and the
types of conflicts that are detected.

Bidirectional replication uses data values to detect and resolve
conflicts. You can choose which data values are used to detect
conflicts. You can choose for the Q Apply program to check one of the
following groups of columns when determining conflicts:

Only key columns values
Key columns and changed columns values
All columns values

For each server, you can choose what action each server takes when a
conflict occurs. Each server can either force the conflicting row into
its target table or ignore the conflict. These options of force and
ignore can be paired in two different ways to provide different
behaviors for the Q Apply program.
The Q Apply program logs all conflicts in the IBMQREP_EXCEPTI ONS table
and continues processing. Over time, the two copies of a logical table
will diverge.

Looking at what you are expecting you may want to have a peer to peer
subscription involving 2 nodes instead of a bidirectional replication.
In a Peer to peer replication the updates can occur at both the
databases and version columns are used to resolve conflicts.

Thanks,
LP

RdR wrote:
Hi,

Has anyone encountered infinite looping in Q Replication? This happens when
I have a source DB2 table A going to a target DB2 table B, it also happens
that the samne target table B is replicated back to source table A (true
bi-directional replication scenario). Once I start replication on a master
to master scenario the changes in A gets replicated to B but that change
gets replicated back to A and so on creating an infinite loop. Is there
something I can define to prevent this from happening.

Also, any collision detection mechanisms I can use?

Thanks,

RdR


Nov 12 '05 #4
>From RdR's note, it appears that changes in source server is applied to
target server, then target server picks it as a change in that server
to replicate back to source, thereby looping infinitely.

Where in a bidirectional or peer will this be setup!! Is it a restart
queue function/setup issue??

I have a gut feeling that it does not end up in IBMQREP_EXCEPTI ONS,
RdR, is that the case?

Nov 12 '05 #5
RdR
Hi LP and Hikums,

That is what I expect, changes on A gets replicated to B and do not come
back again to A starting the infinite loop. And since this is not a
collision it does not go to the IBMQREP_EXCEPTI ONS table, collisions would
but the loop won't because it seems like Q Replication sees it as a
legitimate change. I was hoping there will be a switch that will say, if the
change in A gets replicated to B, B should not send it back or is Q
Replication not a good solution for a Master to Master type of Environment
wherein changes can happen on both sides.

Thanks,

RdR
<la***********@ yahoo.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
In the case of bidirectional Replication changes occur between tables
on two servers. Changes that are made to one copy of a table are
replicated to a second copy of that table, and changes that are made to
the second copy are replicated back to the first copy. This is the
intention. you can think of it as a backup server.

The choices that you make for conflict rules and conflict actions
affect the behavior of how rows are applied. The conflict rules
determine how much of the data is checked to detect a conflict and the
types of conflicts that are detected.

Bidirectional replication uses data values to detect and resolve
conflicts. You can choose which data values are used to detect
conflicts. You can choose for the Q Apply program to check one of the
following groups of columns when determining conflicts:

Only key columns values
Key columns and changed columns values
All columns values

For each server, you can choose what action each server takes when a
conflict occurs. Each server can either force the conflicting row into
its target table or ignore the conflict. These options of force and
ignore can be paired in two different ways to provide different
behaviors for the Q Apply program.
The Q Apply program logs all conflicts in the IBMQREP_EXCEPTI ONS table
and continues processing. Over time, the two copies of a logical table
will diverge.

Looking at what you are expecting you may want to have a peer to peer
subscription involving 2 nodes instead of a bidirectional replication.
In a Peer to peer replication the updates can occur at both the
databases and version columns are used to resolve conflicts.

Thanks,
LP

RdR wrote:
Hi,

Has anyone encountered infinite looping in Q Replication? This happens
when
I have a source DB2 table A going to a target DB2 table B, it also
happens
that the samne target table B is replicated back to source table A (true
bi-directional replication scenario). Once I start replication on a
master
to master scenario the changes in A gets replicated to B but that change
gets replicated back to A and so on creating an infinite loop. Is there
something I can define to prevent this from happening.

Also, any collision detection mechanisms I can use?

Thanks,

RdR

Nov 12 '05 #6
I am pretty sure Q Replication takes care of updates on source as well
as target servers.

Let's hope someone who has more insight come out!!

hi****@gmail.co m wrote:
From RdR's note, it appears that changes in source server is applied to

target server, then target server picks it as a change in that server
to replicate back to source, thereby looping infinitely.

Where in a bidirectional or peer will this be setup!! Is it a restart
queue function/setup issue??

I have a gut feeling that it does not end up in IBMQREP_EXCEPTI ONS,
RdR, is that the case?


Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1677
by: Stuart D. Gathman | last post by:
I have a multi-threaded background program in Python (http://www.bmsi.com/python/milter.html). Rarely, several threads will get themselves into an infinite loop. The system continues to run - but with more and more of the CPU eaten by the looping threads. stderr is connected to a logfile, and exceptions print stack traces to the logfile -...
6
1826
by: chandra.somesh | last post by:
I am having trouble understanding why the code given belows enters an infinite loop when a char is entered instead of an int. i.e.on subsequent looping ,control doesn't wait for user input and just keeps printing "Hello" infinitely. #include<iostream> using namespace std; int main()
6
3863
by: John | last post by:
Hi We have an access app (front-end+backend) running on the company network. I am trying to setup replication for laptop users who go into field and need the data synched between their laptops and the server upon return to the office. I am planning it this; Move all access tables to sql server and then link the tables to access front-end...
56
5904
by: Raphi | last post by:
Hi, I've been using an Access application I wrote for an office with the front-end stored on all computers and the back-end on one of them serving as an Access file server. Now we're moving to a 2nd office 15 minutes down the road. Only one office will be open at a time, so theoretically it'd be possible to copy the back-end manually...
9
3914
by: David W. Fenton | last post by:
See: Updated version of the Microsoft Jet 4.0 Service Pack 8 replication files is available in the Download Center http://support.microsoft.com/?scid=kb;en-us;321076 This includes the Jet 4 synchronizer. This allows anyone to do indirect replication, even without
33
3015
by: dmoran21 | last post by:
Hi all, I am a mathematician and I'm trying to write a program to try out a formula that I've derived. However, it seems that I've got an infinite loop and I don't quite understand why. I was hoping someone could point me in the right direction. Code: #include <stdio.h> #include <math.h>
2
3210
by: Lawrence Krubner | last post by:
Imagine a template system that works by getting a file, as a string, and then putting it through eval(), something like this: $formAsString = $controller->command("readFileAndReturnString", $formName); // 06-22-07 - the next commands try to import all the functions that the
3
7173
by: Hukkky | last post by:
I'm testing simple server/client codes on linux. just server can wait for client's connect sign and accept, and client can't connect to server, this is all. There's no problems just for this objects. I'm testing for the situation.. after the connection between server and client is done, if server or client hits the "ctrl+c" key. The...
0
7413
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7358
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7697
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5894
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3396
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1831
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
980
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
650
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.