Details
-
Bug
-
Resolution: Fixed
-
Major
-
5.0.0
-
None
-
Untriaged
-
Unknown
Description
META().expiration uses covered index it gives right results. When used non covered index it gives 0.
This needs to be documented for Spock may not be addressable in Spock due to following reasons.
1) N1QL fetches data from memecached using GET. The GET call is not includes expiration, seqno, etc...
2) To get this information we need to do GET_META call.
3) Making additional call for each key for SELECT/UPDATE... etc can cause latency can be doubled and through put drops drastically. Also the data between two calls can be out of sync.
The possible solution is defined new protocol and pass as bit flags that what information needed as single call.
Repro :
-----------
brew install libcouchbase
|
cbc create foo -V "{\"test\":\"bar\"}" -U couchbase://127.0.0.1/default -e 1000000 -u Administrator -P password |
create index ixdi on default(meta().expiration); |
select meta().id, meta().expiration from default where meta().expiration is not null; |
--- covered index. above select gives one row.
|
select meta().id, meta().expiration, xxx from default where meta().expiration is not null; |
--- non covered index, no rows given
|
|
See MB-15950 and it comments more details.