473,729 Members | 2,376 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 2347
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
1687
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 - so debugging them is easy. However, I haven't been able to find a way to cause a looping thread to...
6
1847
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
3882
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 mdb app (using odbc?). Copy the same setup (access front end + sql backend) onto each laptop....
56
5965
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 every night from one office to another, but frankly, that's pretty annoying.
9
3931
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
3050
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
3226
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
7203
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 problem is either case for server or for client hits the "ctrl +c"key, they goes infinite loop. I...
0
8917
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8761
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9281
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9200
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8148
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.