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

Enis Soztutar commented on HBASE-8497:
--------------------------------------

bq. We need to be very careful with this, because WAL is not guaranteed to be 
finished. 
Agreed. It seems that we have to do some heuristics to decide whether the 
trailer is valid. We can use something like the following format:
{code}
<walEdits><PB Trailer><Size of trailer><PBMagic>
{code}
Then, if we can read the magic, and size, we apply some validation on the size 
(like it should not be negative, and should not be larger than XXX bytes), we 
try to read the PB'ed object. If successful, we will declare success at reading 
the trailer. 

bq. Also it needs to be done fast, before PB WAL ships, or one would also have 
to care about backward compat
That is why I suggest putting an empty trailer in this issue for 0.95.1 or 
0.95.2. 

bq. And nothing should depend on the trailer necessarily being there, WAL 
should be replayable without it
yes, this should be optional. 
                
> 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
>             Fix For: 0.98.0, 0.95.1
>
>
> 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