Skip to content

Conversation

@simon-dew
Copy link
Contributor

@simon-dew simon-dew commented Mar 9, 2022

The following draft documentation is ready for review:

Docs issues: DOC-9595 and DOC-9720

@simon-dew simon-dew marked this pull request as ready for review March 9, 2022 18:33
@simon-dew
Copy link
Contributor Author

@miaobingjie — the spec doc states that system:dictionary_cache returns the same fields as system:dictionary,

except for an extra node field that shows entries from different query nodes.

I spent a while playing around with multiple query nodes, but I couldn't get this extra node field to appear. Have you got a test case or an example I could see?

@marcogrecopriolo
Copy link

You are so right! A bit too late for me, but I'll fix it tomorrow

@miaobingjie
Copy link

With regard to system:dictionary and system:dictinoary_cache:
#3: An array of indexes available in the keyspace
this is not quite accurate. An index will only show up in this array if index statistics is available for the index. In other words, there could be indexes defined on the keyspace but not showing in this array.
#4: An array of statistics for the index
this is correct, but you might want to add: with one element for each partition of the index. That is to say, for a non-partitioned index, we will have one element in the array; for a partitioned index, we will have one element for each index partition in the array.

With regard to the "node" field when selecting from system:dictionary_cache, you will need to make sure there are entries in the dictionary cache for each query node, i.e., run a query on each of the query node referencing the keyspace. The dictionary cache is loaded on-demand for a keyspace, i.e. you'll need to reference the keyspace on that query node. Once you've done this, then try selecting from system:dictionary_cache from one of the query node, you should see entries from both query nodes, with the entry representing the remote node having the extra "node" field.

@marcogrecopriolo
Copy link

@simon-dew the node information was missing from the entries from the local node.
It should be fixed in the next build.

@simon-dew
Copy link
Contributor Author

I couldn't get this extra node field to appear

Okay, I understand this will appear in local nodes in later builds. For now, running queries from two separate query nodes fixed this for me.

@simon-dew simon-dew merged commit 53184e4 into couchbase:release/7.1 Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants