You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2015/11/01 21:42:27 UTC

[jira] [Created] (HBASE-14737) Clear cachedMaxVersions when setValue(VERSIONS, value) called

James Taylor created HBASE-14737:
------------------------------------

             Summary: Clear cachedMaxVersions when setValue(VERSIONS, value) called
                 Key: HBASE-14737
                 URL: https://issues.apache.org/jira/browse/HBASE-14737
             Project: HBase
          Issue Type: Bug
            Reporter: James Taylor


HColumnDescriptor caches the value of VERSIONS in a cachedMaxVersions member variable. This member variable should be reset or cleared when setValue(HConstants.VERSIONS, value) is called, like this:
{code}
  static final bytes[] VERSIONS_BYTES = Bytes.toBytes(HConstants.VERSIONS);
  public HColumnDescriptor setValue(byte[] key, byte[] value) {
    if (Bytes.compare(HConstants.VERSIONS_BYTES, key) == 0) {
        cachedMaxVersions = UNINITIALIZED;
    }
    values.put(new ImmutableBytesWritable(key),
      new ImmutableBytesWritable(value));
    return this;
  }
{code}

Otherwise, you continue getting back cachedMaxVersions instead of the updated value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)