hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars George (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-8947) Thrift 2 : Replace "bool writeToWAL" with "TDurability durability"
Date Tue, 23 Jul 2013 14:32:49 GMT

    [ https://issues.apache.org/jira/browse/HBASE-8947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13716423#comment-13716423
] 

Lars George commented on HBASE-8947:
------------------------------------

Hey [~madani], I think there is a flaw in the numbering of the Thrift fields:

In trunk (and 0.95 then):

{code}
 struct TPut {
   1: required binary row,
   2: required list<TColumnValue> columnValues
   3: optional i64 timestamp,
-  4: optional bool writeToWal = 1,
+  4: optional TDurability durability,
   5: optional map<binary, binary> attributes
 }
{code}

and in 0.94:

{code}
 struct TPut {
   1: required binary row,
   2: required list<TColumnValue> columnValues
   3: optional i64 timestamp,
-  4: optional bool writeToWal = 1,
-  5: optional map<binary, binary> attributes
+  4: optional bool writeToWal,
+  5: optional TDurability durability,
+  6: optional map<binary, binary> attributes
 }
{code}

The "attributes" are changing their numbers, which means a 0.94 client will not work with
a trunk server. You need to keep the numbers unique and so that they never change. In other
words, the 0.94 patch should be:

{code}
 struct TPut {
   1: required binary row,
   2: required list<TColumnValue> columnValues
   3: optional i64 timestamp,
-  4: optional bool writeToWal = 1,
-  5: optional map<binary, binary> attributes
+  4: optional bool writeToWal,
+  6: optional TDurability durability,
+  5: optional map<binary, binary> attributes
 }
{code}

note the flipped numbering to keep the recently added "attributes" on ID #5. The trunk patch
then should include

{code}
 struct TPut {
   1: required binary row,
   2: required list<TColumnValue> columnValues
   3: optional i64 timestamp,
-  4: optional bool writeToWal = 1,
+  6: optional TDurability durability,
   5: optional map<binary, binary> attributes
 }
{code}

i.e. removing ID #4 but keeping ID #5 and adding #6 as per the above.

Makes sense?
                
> Thrift 2 : Replace "bool writeToWAL" with "TDurability durability" 
> -------------------------------------------------------------------
>
>                 Key: HBASE-8947
>                 URL: https://issues.apache.org/jira/browse/HBASE-8947
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Thrift
>            Reporter: Hamed Madani
>            Assignee: Hamed Madani
>         Attachments: HBASE-8947.patch, HBASE-8947-v2.patch, HBASE-8947-v3-0.94.patch,
HBASE-8947-v3.patch
>
>
> Introduce new enum *TDurability* to expose more options for *Write To Wal.* 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message