Grokbase Groups HBase dev July 2009
FAQ
Put on client-side uses passed-in byte[]s rather than always using copies
-------------------------------------------------------------------------

Key: HBASE-1717
URL: https://issues.apache.org/jira/browse/HBASE-1717
Project: Hadoop HBase
Issue Type: Bug
Components: client
Affects Versions: 0.20.0
Reporter: Jonathan Gray
Assignee: Jonathan Gray
Priority: Critical
Fix For: 0.20.0


During review of Put with ryan, found that we are using a passed in reference to family in add() rather than a local copy. If the backing array changed values, this could cause trouble.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Search Discussions

  • Jonathan Gray (JIRA) at Jul 28, 2009 at 7:42 pm
    [ https://issues.apache.org/jira/browse/HBASE-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Jonathan Gray updated HBASE-1717:
    ---------------------------------

    Attachment: HBASE-1717-v1.patch

    Uses local copy when using put(byte[], ...). Makes a clone of KV when using put(KV).
    Put on client-side uses passed-in byte[]s rather than always using copies
    -------------------------------------------------------------------------

    Key: HBASE-1717
    URL: https://issues.apache.org/jira/browse/HBASE-1717
    Project: Hadoop HBase
    Issue Type: Bug
    Components: client
    Affects Versions: 0.20.0
    Reporter: Jonathan Gray
    Assignee: Jonathan Gray
    Priority: Critical
    Fix For: 0.20.0

    Attachments: HBASE-1717-v1.patch


    During review of Put with ryan, found that we are using a passed in reference to family in add() rather than a local copy. If the backing array changed values, this could cause trouble.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Jonathan Gray (JIRA) at Jul 28, 2009 at 7:44 pm
    [ https://issues.apache.org/jira/browse/HBASE-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Jonathan Gray updated HBASE-1717:
    ---------------------------------

    Status: Patch Available (was: Open)

    Review for commit. I think KV cloning is the way to go. If we don't, then we need to be very explicit in the javadocs about when you need to be sure not to touch passed values. With this patch, we don't have to say anything because it copies everything.
    Put on client-side uses passed-in byte[]s rather than always using copies
    -------------------------------------------------------------------------

    Key: HBASE-1717
    URL: https://issues.apache.org/jira/browse/HBASE-1717
    Project: Hadoop HBase
    Issue Type: Bug
    Components: client
    Affects Versions: 0.20.0
    Reporter: Jonathan Gray
    Assignee: Jonathan Gray
    Priority: Critical
    Fix For: 0.20.0

    Attachments: HBASE-1717-v1.patch


    During review of Put with ryan, found that we are using a passed in reference to family in add() rather than a local copy. If the backing array changed values, this could cause trouble.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Jonathan Gray (JIRA) at Jul 28, 2009 at 7:46 pm
    [ https://issues.apache.org/jira/browse/HBASE-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Jonathan Gray updated HBASE-1717:
    ---------------------------------

    Status: Open (was: Patch Available)

    Should copy row passed in as well.
    Put on client-side uses passed-in byte[]s rather than always using copies
    -------------------------------------------------------------------------

    Key: HBASE-1717
    URL: https://issues.apache.org/jira/browse/HBASE-1717
    Project: Hadoop HBase
    Issue Type: Bug
    Components: client
    Affects Versions: 0.20.0
    Reporter: Jonathan Gray
    Assignee: Jonathan Gray
    Priority: Critical
    Fix For: 0.20.0

    Attachments: HBASE-1717-v1.patch


    During review of Put with ryan, found that we are using a passed in reference to family in add() rather than a local copy. If the backing array changed values, this could cause trouble.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Jonathan Gray (JIRA) at Jul 28, 2009 at 7:48 pm
    [ https://issues.apache.org/jira/browse/HBASE-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Jonathan Gray updated HBASE-1717:
    ---------------------------------

    Attachment: HBASE-1717-v2.patch

    Makes a copy of row during instantiation. This couldn't cause issues we're seeing, but while we're being safe...
    Put on client-side uses passed-in byte[]s rather than always using copies
    -------------------------------------------------------------------------

    Key: HBASE-1717
    URL: https://issues.apache.org/jira/browse/HBASE-1717
    Project: Hadoop HBase
    Issue Type: Bug
    Components: client
    Affects Versions: 0.20.0
    Reporter: Jonathan Gray
    Assignee: Jonathan Gray
    Priority: Critical
    Fix For: 0.20.0

    Attachments: HBASE-1717-v1.patch, HBASE-1717-v2.patch


    During review of Put with ryan, found that we are using a passed in reference to family in add() rather than a local copy. If the backing array changed values, this could cause trouble.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Jonathan Gray (JIRA) at Jul 28, 2009 at 7:48 pm
    [ https://issues.apache.org/jira/browse/HBASE-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Jonathan Gray updated HBASE-1717:
    ---------------------------------

    Status: Patch Available (was: Open)
    Put on client-side uses passed-in byte[]s rather than always using copies
    -------------------------------------------------------------------------

    Key: HBASE-1717
    URL: https://issues.apache.org/jira/browse/HBASE-1717
    Project: Hadoop HBase
    Issue Type: Bug
    Components: client
    Affects Versions: 0.20.0
    Reporter: Jonathan Gray
    Assignee: Jonathan Gray
    Priority: Critical
    Fix For: 0.20.0

    Attachments: HBASE-1717-v1.patch, HBASE-1717-v2.patch


    During review of Put with ryan, found that we are using a passed in reference to family in add() rather than a local copy. If the backing array changed values, this could cause trouble.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • stack (JIRA) at Jul 28, 2009 at 7:58 pm
    [ https://issues.apache.org/jira/browse/HBASE-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736247#action_12736247 ]

    stack commented on HBASE-1717:
    ------------------------------

    +1 on getting fresh instance of family to add to familymap but -1 on cloning KV. KV is immutable. If client makes KVs backed by a byte array of their own construction and then reuse, then they will have issue. You suggest javadoc'ing... That seems good to me.
    Put on client-side uses passed-in byte[]s rather than always using copies
    -------------------------------------------------------------------------

    Key: HBASE-1717
    URL: https://issues.apache.org/jira/browse/HBASE-1717
    Project: Hadoop HBase
    Issue Type: Bug
    Components: client
    Affects Versions: 0.20.0
    Reporter: Jonathan Gray
    Assignee: Jonathan Gray
    Priority: Critical
    Fix For: 0.20.0

    Attachments: HBASE-1717-v1.patch, HBASE-1717-v2.patch


    During review of Put with ryan, found that we are using a passed in reference to family in add() rather than a local copy. If the backing array changed values, this could cause trouble.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Jonathan Gray (JIRA) at Jul 28, 2009 at 8:00 pm
    [ https://issues.apache.org/jira/browse/HBASE-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Jonathan Gray updated HBASE-1717:
    ---------------------------------

    Attachment: HBASE-1717-v3.patch

    Removes cloning of KV, adds javadoc to explain the passed KV must be immutable.
    Put on client-side uses passed-in byte[]s rather than always using copies
    -------------------------------------------------------------------------

    Key: HBASE-1717
    URL: https://issues.apache.org/jira/browse/HBASE-1717
    Project: Hadoop HBase
    Issue Type: Bug
    Components: client
    Affects Versions: 0.20.0
    Reporter: Jonathan Gray
    Assignee: Jonathan Gray
    Priority: Critical
    Fix For: 0.20.0

    Attachments: HBASE-1717-v1.patch, HBASE-1717-v2.patch, HBASE-1717-v3.patch


    During review of Put with ryan, found that we are using a passed in reference to family in add() rather than a local copy. If the backing array changed values, this could cause trouble.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Jonathan Gray (JIRA) at Jul 28, 2009 at 8:14 pm
    [ https://issues.apache.org/jira/browse/HBASE-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Jonathan Gray updated HBASE-1717:
    ---------------------------------

    Resolution: Fixed
    Hadoop Flags: [Reviewed]
    Status: Resolved (was: Patch Available)

    v3 Committed.
    Put on client-side uses passed-in byte[]s rather than always using copies
    -------------------------------------------------------------------------

    Key: HBASE-1717
    URL: https://issues.apache.org/jira/browse/HBASE-1717
    Project: Hadoop HBase
    Issue Type: Bug
    Components: client
    Affects Versions: 0.20.0
    Reporter: Jonathan Gray
    Assignee: Jonathan Gray
    Priority: Critical
    Fix For: 0.20.0

    Attachments: HBASE-1717-v1.patch, HBASE-1717-v2.patch, HBASE-1717-v3.patch


    During review of Put with ryan, found that we are using a passed in reference to family in add() rather than a local copy. If the backing array changed values, this could cause trouble.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieshbase, hadoop
postedJul 28, '09 at 7:38p
activeJul 28, '09 at 8:14p
posts9
users1
websitehbase.apache.org

1 user in discussion

Jonathan Gray (JIRA): 9 posts

People

Translate

site design / logo © 2022 Grokbase