[ 
https://issues.apache.org/jira/browse/HBASE-8497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Himanshu Vashishtha updated HBASE-8497:
---------------------------------------

    Attachment: HBASE-8497-v2.patch

Incorporated feedback on the initial version. 
Apart from the nits that are fixed:
a) Modified exception handling as suggested.
b) Added sanity checks on the trailer size. Currently, this patch makes 
trailer_max_size to 1MB, and didn't make it configurable; This is to avoid 
cases where a user lowers the max size and a reader tries to read old logs. 
Moreover, I see 1MB size a good enough size for the use case (6774). If there 
is any requirement to increase it, it could be done in some other jira. Please 
suggest if you think differently.
c) Trailer is instantiated in the init() method. While writing the trailer, a 
check is made in case trailer is set to null or its size exceeds max_size. In 
this case, a default trailer is written rather with a WARN message.
d) Added test case for  corrupt trailer.

Test: I tested it on my local by killing the RS and doing the split, etc. Ran 
unit tests for classes HLog* many times.

                
> Protobuf WAL also needs a trailer 
> ----------------------------------
>
>                 Key: HBASE-8497
>                 URL: https://issues.apache.org/jira/browse/HBASE-8497
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Protobufs, wal
>    Affects Versions: 0.95.1
>            Reporter: Enis Soztutar
>            Assignee: Himanshu Vashishtha
>             Fix For: 0.98.0, 0.95.1
>
>         Attachments: HBASE-8497-v0.patch, HBASE-8497-v2.patch
>
>
> New Protobuf WAL has a header, but we will probably need a trailer as well, 
> reserved for later usage. 
> Right now, we can we just serialize an empty trailer, but putting more 
> metadata there, like range of sequence_id's, region names, table names etc 
> might be needed in the future. 

--
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

Reply via email to