False difference

38 views
Skip to first unread message

Federico Sierra

unread,
Jan 23, 2013, 3:55:39 PM1/23/13
to rub...@googlegroups.com
Hello. 
I'm having some trouble trying to figure out why rubyrep scan/sync is reporting 2 differences in a table between two databases (a central master, and a client master).

The rows are the same in both tables, but when we sync we get a duplicate key error and the process stops.

I dumped the db of the central master and restored it to my local pg server and configured rubyrep to scan for differences between my copy and the client master and there was no differences reported.
I then scanned the central master and its copy and it reported 2 false differences.
I don't have a clue why it's working with an exact copy of the database restored in other pg server and not in the original.

config for central <-> client master
RR::Initializer::run do |config|
  config.left = {
    :adapter  => 'postgresql',
    :database => 'SMOLBD',
    :username => 'postgres',
    :password => 'pw',
:schema_search_path => 'smolbd' ,
    :host     => '172.17.100.120',
:port  => '5130'
  }
  
  config.right = {
    :adapter  => 'postgresql', # or 'mysql'
    :database => 'SMOLBD',
    :username => 'postgres',
    :password => 'pw',
:schema_search_path => 'smolbd' ,
    :host     => '172.17.1.100',
:port  => '5130'
  }
  
  # ----------------------------------- 
  # CONFIGURATION OPTIONS 
  # ----------------------------------- 
  #config.options[:auto_key_limit] = 60 
   config.options[:rep_prefix] = 'rep_ori' 
   config.options[:database_connection_timeout] = 70
   config.options[:row_buffer_size] = 100
   config.options[:commit_frequency] = 500
  # ----------------------------------- 
  # TABLES TO SCAN, SYNC, & REPLICATE 
  # ----------------------------------- 
  config.include_tables /./
end

config for copy of central master <-> client master
RR::Initializer::run do |config|
  config.left = {
    :adapter  => 'postgresql',
    :database => 'SMOLBD',
    :username => 'postgres',
    :password => 'pw',
:schema_search_path => 'smolbd' ,
    :host     => 'localhost',
:port  => '5130'
  }
  
  config.right = {
    :adapter  => 'postgresql', # or 'mysql'
    :database => 'SMOLBD',
    :username => 'postgres',
    :password => 'pw',
:schema_search_path => 'smolbd' ,
    :host     => '172.17.1.100',
:port  => '5130'
  }

# ----------------------------------- 
  # CONFIGURATION OPTIONS 
  # ----------------------------------- 
  #config.options[:auto_key_limit] = 60 
   config.options[:rep_prefix] = 'rep_ori' 
   config.options[:database_connection_timeout] = 70
   config.options[:row_buffer_size] = 100
   config.options[:commit_frequency] = 500
  # ----------------------------------- 
  # TABLES TO SCAN, SYNC, & REPLICATE 
  # ----------------------------------- 
  config.include_tables /./
end
Reply all
Reply to author
Forward
0 new messages