XDR <= 3.4.1 Parsing problem workaround


#1

Synopsis:

In versions prior or equal to 3.4.1 there is a parsing bug in XDR that forces user to create the configuration in the correct order.

You will not see any error messages around this with one exception. If enable-xdr is at the top and your DCs are below sets you will see the following error in the log:

XDR is enabled but no datacenter is specified for the namespace 'test'.

The only indication (except for the above) is that the digestlog keeps filling up but nothing is shipping like so:

Throughput=0 Total=[Shipped=0 Logged[+resumed]=13100 Relogged=0 LocalProcessed=0 ReplicaProcessed=0 Retries=0] Unique=[0]

Example of incorrect syntax

namespace test {
        replication-factor 2
        memory-size 16g
        default-ttl 2d
        max-ttl 2d

        sets-enable-xdr true
 
        set lineitem-freq-test {
           set-enable-xdr  false
        }
 
        set siteid-freq-test {
           set-enable-xdr  false
        }


        single-bin false
        data-in-index false
        enable-xdr true
        xdr-remote-datacenter us-west-1
        xdr-remote-datacenter ap-southeast-1
        xdr-remote-datacenter eu-west-1
        storage-engine device {
                device /dev/xvdf
                data-in-memory true
                write-block-size 128K
        }
}

It’s not enough to simply move enable-xdr true to top as this will give an error about no defined DCs. See the following correct configuration:

namespace test {
        enable-xdr true
        replication-factor 2
        memory-size 16g
        default-ttl 2d
        max-ttl 2d
        
        xdr-remote-datacenter us-west-1
        xdr-remote-datacenter ap-southeast-1
        xdr-remote-datacenter eu-west-1
        
        sets-enable-xdr true
 
        set lineitem-freq-test {
           set-enable-xdr  false
        }
 
        set siteid-freq-test {
           set-enable-xdr  false
        }
        single-bin false
        data-in-index false
        storage-engine device {
                device /dev/xvdf
                data-in-memory true
                write-block-size 128K
        }
}