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.
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);
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