473,327 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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 2317
With my limited exposure,

Do you see any errors in the IBMQREP_EXCEPTIONS?

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.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
With my limited exposure,

Do you see any errors in the IBMQREP_EXCEPTIONS?

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_EXCEPTIONS 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_EXCEPTIONS,
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_EXCEPTIONS 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.googlegr oups.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_EXCEPTIONS 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.com 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_EXCEPTIONS,
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
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...
6
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...
6
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...
56
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...
9
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...
33
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...
2
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",...
3
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.