CouchBase 4.0 XDCR Replication Issue

Hi all,
We’re evaluating Couchbase for a new project and i’m trying to test the XDCR Replication.
I’m using the “travel-sample” buckets that i’m trying to replicate from cluster A to Cluster B on buckets “TraveSample” which is a fresh new created buckets.
After have configured everything i can see the buckets replicated and all the data seems copied.
The document count on the Cluster B is exactly the same than the count of the Cluster A.
But if i executed some N1QL queries i didn’t get all data on cluster B.

select * from TravelSample
return never more than 1978 documents!!
I did not see any error on any logs, i try to restart several times the replication and i’ve still have the same issue. Couchbase detect that Cluster A is replicated to Cluster B but in fact from Cluster B i cannot get all the documents.
Is it an issue of the couchbase 4 or did i miss something.

Thanks,
Ben

Have you recreated your indexes on Cluster B?

Yes i have created exactly the same indexes on the both server but even if it was not the case that should not affect the result only the performance.

Try creating a PRIMARY INDEX in both GSI and VIEWS:

CREATE PRIMARY INDEX ON `TravelSample` USING GSI;
CREATE PRIMARY INDEX ON `TravelSample` USING VIEW;

See what the execution plan with EXPLAIN.

EXPLAIN SELECT COUNT(*) as T_TOTAL FROMTravelSample

It should tell you that its using the primary index.

then try forcing it to use specific indexes (view & gsi)

SELECT COUNT(*) as T_TOTAL FROM `TravelSample` USE INDEX (#Primary USING GSI);
SELECT COUNT(*) as T_TOTAL FROM `TravelSample` USE INDEX (#Primary USING VIEW);

They “should” return the same results.

I have created the both index but impossible to use the one created with USING View.
By the way,

SELECT COUNT(*) FROM TravelSample

return the correct number 31569 but

SELECT * from TravelSample

return only 1978 item. If i execute any other queries as

Select * from TravelSample where type=“airline”

I did not get the correct result. The count item is correct but i did not access to the correct values.

When I run: <cbq> SELECT * FROM travel-sample;

My output is:

                    "day": 6,
                    "flight": "AF202",
                    "utc": "18:10:00"
                },
                {
                    "day": 6,
                    "flight": "AF284",
                    "utc": "16:33:00"
                }
            ],
            "sourceairport": "TLV",
            "stops": 0,
            "type": "route"
        }
    }
],
"status": "success",
"metrics": {
    "elapsedTime": "19.845874548s",
    "executionTime": "19.845836553s",
    "resultCount": 31569,
    "resultSize": 101111696
}

}

When you run: SELECT * FROM travel-sample;

A. Is the resultCount returning 31569 & the total JSON OUTPUT only returning 1978
or
B. Is the resultCount returning 1978 & the total JSON OUTPUT only returning 1978