[moved: JavaSDK->CouchbaseServer] N1QL for 4.1.X count(*) problem


#21

hi @egrep,
dint get a chance to look into this yet. Will keep you posted.
-Prasad


#22

@prasad,
thanks, will wait for your replies.


#23

This issue has been assigned to me. I expect to have something useful to say about it tomorrow.


#24

@johan_larson,
is there a JIRA ticket ?


#25

The ticket number is MB-19659.


#26

@johan_larson,
thakns!


#27

Some findings to date:

  • the problem does not repro with only 1 node (I tested on my mac)
  • the problem does repro with 3 nodes
  • the problem does not repro if 3 duplicate indexes are reduced to a single one
  • the problem does not repro if the index is specifically chosen in the query using a USE INDEX (i1 USING GSI) clause

I suspect this is some sort of problem with caching plans across multiple nodes. Perhaps things go wrong when we prepare a plan on one query engine, and try to use it on another.

I’m continuing my investigations.


#28

@johan_larson,

  • the problem does not repro if 3 duplicate indexes are reduced to a single one
  • the problem does not repro if the index is specifically chosen in the query using a USE INDEX

Not so bad, sounds like “partial workarounds”.
But “caching plans across multiple nodes” error, as you said, still remains.


#29

@johan_larson,
any news ?


#30

@johan_larson,
sorry, missed your last comment (https://issues.couchbase.com/browse/MB-19659)


#31

@simonbasle, @johan_larson
is there any progress for https://issues.couchbase.com/browse/MB-19659 ?


#32

There is a fix in process for another pair of bugs (MB-18841/MB-19509) that may fix MB-19659.


#33

@johan_larson,
https://issues.couchbase.com/browse/MB-19509 => Fix versions: spock (2017)
https://issues.couchbase.com/browse/MB-18841 => Fix versions: spock (2017)
Sorry, but this is more like “buried with bureaucracy of development”, rather then “fix in process”.


#34

Let me be more specific.

There is an actual changelist currently in review for MB-19509 and MB-18841. I had expected it to be available today, but it’s still being reviewed. Once it is accepted and submitted, I will verify whether it also fixes MB-19659. If it does, I will argue for back-propagating the fix to the 4.1 line, which would make it available in the next 4.1.X release and in 4.5.1.

If the current changelist is not accepted or does not solve the problem, this is going to take longer because there is likely to be some wrangling about whether the query engine or the Java SDK needs to change its behavior.


#35

@johan_larson,
ok, i got it, thanks!


#36

@egrep, just to keep you in the loop: 'tis done.
In 4.1.2 too.


#37

@marcog,
thanks!
it’s twice sad that GSI: different sporadic bugs + fragmentation up to 98%
:frowning:


#38

btw,
@johan_larson thanks to you too :slight_smile: