Description

To work through the implementation of OBSERVE[1], we were looking for the details on STATS KEY, only to find it's not documented. It exists in the server implementation, but it's not even in the stats.org[2] associated with the code repository.

This statistic and all others that are public interface should be documented in the manual.

Implementation of OBSERVE operations in the various client libraries will need this information.

Chiyoung Seo
added a comment - 24/May/12 4:28 AM Jin,
We should provide the "stats key" documentation for the client library team, so that they can refer to this documentation to implement OBSERVE command in the client libraries.

Documentation mixes stats key and stats vkey, though the return values for each need to be understood. Also, see MB-5435. This documentation appears to be wrong with respect to the key valid field, or there's some subtlety that is not explained by the table.

Matt Ingenthron
added a comment - 04/Jun/12 11:39 AM - edited Documentation mixes stats key and stats vkey, though the return values for each need to be understood. Also, see MB-5435 . This documentation appears to be wrong with respect to the key valid field, or there's some subtlety that is not explained by the table.

Stats key and vkey return the same data. The only difference is the key_valid field returned by stats vkey. I have marked each stat with the command that returns it in the column on the left. I made a few minor wording changes to the documentation, but I disagree that the documentation is wrong. Please provide an explanation of what is confusing or contact me over Skype to discuss anything you think is incorrect.

Stats Key and Vkey

key_cas

The keys current cas value

KV

key_data_age

How long the key has waited for its

KV

value to be persisted (0 if clean)

KV

key_exptime

Expiration time from the epoch

KV

key_flags

Flags for this key

KV

key_is_dirty

If the value is not yet persisted

KV

key_last_modified_time

Last updated time

KV

key_valid

See description below

V

key_vb_state

The vbucket state of this key

KV

=key_valid= can have the following responses:

this_is_a_bug - Some case we didn't take care of.
dirty - The value in memory has not been persisted yet.
length_mismatch - Data length in memory doesn't match the data length on disk.
data_mismatch - The data in memory doesn't match the data on disk.
flags_mismatch - The flags in memory don't match the flags on disk.
valid - The data on disk and in memory match
ram_but_not_disk - The value doesn't exist yet on disk.
item_deleted - The item has been deleted.

Mike Wiederhold
added a comment - 04/Jun/12 12:52 PM Stats key and vkey return the same data. The only difference is the key_valid field returned by stats vkey. I have marked each stat with the command that returns it in the column on the left. I made a few minor wording changes to the documentation, but I disagree that the documentation is wrong. Please provide an explanation of what is confusing or contact me over Skype to discuss anything you think is incorrect.
Stats Key and Vkey
key_cas
The keys current cas value
KV
key_data_age
How long the key has waited for its
KV
value to be persisted (0 if clean)
KV
key_exptime
Expiration time from the epoch
KV
key_flags
Flags for this key
KV
key_is_dirty
If the value is not yet persisted
KV
key_last_modified_time
Last updated time
KV
key_valid
See description below
V
key_vb_state
The vbucket state of this key
KV
=key_valid= can have the following responses:
this_is_a_bug - Some case we didn't take care of.
dirty - The value in memory has not been persisted yet.
length_mismatch - Data length in memory doesn't match the data length on disk.
data_mismatch - The data in memory doesn't match the data on disk.
flags_mismatch - The flags in memory don't match the flags on disk.
valid - The data on disk and in memory match
ram_but_not_disk - The value doesn't exist yet on disk.
item_deleted - The item has been deleted.

Matt Ingenthron
added a comment - 04/Jun/12 5:16 PM My confusion too was based on the last column. Could we clarify that (if not done already)? I thought you were saying whether or not each stat returned a key and value for the stat.