asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen Luo (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ASTERIXDB-1929) Factor out isAntimatter from TupleWriter and TupleWriterFactory
Date Sat, 03 Jun 2017 05:12:04 GMT

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

Chen Luo commented on ASTERIXDB-1929:
-------------------------------------

I think the answer is NO. Actually I saw this referencing factory idea initially was used
by ExternalBtree, which also needs to insert anti-matter tuples during bulkload.

The current workflow of this tuple writer is as follows. When we create a LSMBTree, we would
specify its LeafFrameFactory, which depends on the provided TupleWriterFactory. Then, BTree
would call LeafFrameFactory to create leaf frames, which calls the TupleWriterFactory to create
the corresponding tuple writer. Thus, the tuple writer is only managed by the leaf frame,
and BTree calls its insertTuple method to do insertion. The problem here is that LSMBTree
or even BTree couldn't track the corresponding TupleWriter. So currently, this LSMTreeRefrencingTupleWriterFactory
would track it and set it to delete mode when necessary.

> Factor out isAntimatter from TupleWriter and TupleWriterFactory
> ---------------------------------------------------------------
>
>                 Key: ASTERIXDB-1929
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1929
>             Project: Apache AsterixDB
>          Issue Type: Improvement
>          Components: Storage
>            Reporter: Yingyi Bu
>            Assignee: Chen Luo
>
> isAntimatter is a property of the tuple that we're writing, but not a property of the
Writer.  Hence, we probably should remove setAntimatter(...) from the TupleWriter.
> Currently, for each tuple write operation, we need to call setAntimatter() in both TupleWriterFactory
and TupleWriter.  This is painful and potentially buggy -- a XxxFactory typically is one per
NC.
> Instead, we can add a parameter to write tuple method:
> public int writeTuple(ITupleReference tuple, byte[] targetBuf, int targetOff) 
> ->
> public int writeTuple(ITupleReference tuple, byte[] targetBuf, int targetOff, boolean
isDelete)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message