You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Lanny Ripple (Created) (JIRA)" <ji...@apache.org> on 2011/11/03 18:21:32 UTC

[jira] [Created] (CASSANDRA-3450) maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null

maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null
-----------------------------------------------------------------------------

                 Key: CASSANDRA-3450
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3450
             Project: Cassandra
          Issue Type: Bug
          Components: Hadoop
    Affects Versions: 1.0.1
            Reporter: Lanny Ripple
            Priority: Minor


In {{ColumnFamilyRecordReder}} {{computeNext()}} calls {{maybeInit()}} and then if {{rows}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3450) maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null

Posted by "Brandon Williams (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams updated CASSANDRA-3450:
----------------------------------------

    Reviewer: brandon.williams
    
> maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3450
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3450
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 1.0.1
>            Reporter: Lanny Ripple
>            Priority: Minor
>
> In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{rows}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3450) maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null

Posted by "Brandon Williams (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams updated CASSANDRA-3450:
----------------------------------------

    Assignee: Lanny Ripple
    
> maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3450
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3450
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 0.8.7, 1.0.1
>            Reporter: Lanny Ripple
>            Assignee: Lanny Ripple
>             Fix For: 0.8.8, 1.0.3
>
>         Attachments: v1-0001-CASSANDRA-3450.txt
>
>
> 1) In {{ColumnFamilyRecordReader}} {{isPredicateEmpty}} needs bracing to correctly place the {{else if}} to the properly controlling {{if}}.
> 1a) {{isPredicateEmpty}} should use an || in the getSlice_range predicate rather than &&.
> 2) In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{ros}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3450) maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146375#comment-13146375 ] 

Hudson commented on CASSANDRA-3450:
-----------------------------------

Integrated in Cassandra-0.8 #395 (See [https://builds.apache.org/job/Cassandra-0.8/395/])
    Revert CASSANDRA-3450

jake : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1199242
Files : 
* /cassandra/branches/cassandra-0.8/CHANGES.txt
* /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java

                
> maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3450
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3450
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 0.8.7, 1.0.1
>            Reporter: Lanny Ripple
>            Assignee: Lanny Ripple
>             Fix For: 0.8.8, 1.0.3
>
>         Attachments: v1-0001-CASSANDRA-3450.txt
>
>
> 1) In {{ColumnFamilyRecordReader}} {{isPredicateEmpty}} needs bracing to correctly place the {{else if}} to the properly controlling {{if}}.
> 1a) {{isPredicateEmpty}} should use an || in the getSlice_range predicate rather than &&.
> 2) In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{ros}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3450) maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null

Posted by "Brandon Williams (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams updated CASSANDRA-3450:
----------------------------------------

    Reviewer: brandon.williams
    
> maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3450
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3450
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 1.0.1
>            Reporter: Lanny Ripple
>
> 1) In {{ColumnFamilyRecordReader}} {{isPredicateEmpty}} needs bracing to correctly place the {{else if}} to the properly controlling {{if}}.
> 1a) {{isPredicateEmpty}} should use an || in the getSlice_range predicate rather than &&.
> 2) In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{ros}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3450) maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null

Posted by "Lanny Ripple (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lanny Ripple updated CASSANDRA-3450:
------------------------------------

    Description: 
In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{rows}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.



  was:
In {{ColumnFamilyRecordReder}} {{computeNext()}} calls {{maybeInit()}} and then if {{rows}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.



    
> maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3450
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3450
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 1.0.1
>            Reporter: Lanny Ripple
>            Priority: Minor
>
> In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{rows}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3450) maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null

Posted by "T Jake Luciani (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146310#comment-13146310 ] 

T Jake Luciani commented on CASSANDRA-3450:
-------------------------------------------

Reverted this change due to a bug related to single node test failures.  Going to attempt a fresh fix at this and CASSANDRA-2855  
                
> maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3450
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3450
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 0.8.7, 1.0.1
>            Reporter: Lanny Ripple
>            Assignee: Lanny Ripple
>             Fix For: 0.8.8, 1.0.3
>
>         Attachments: v1-0001-CASSANDRA-3450.txt
>
>
> 1) In {{ColumnFamilyRecordReader}} {{isPredicateEmpty}} needs bracing to correctly place the {{else if}} to the properly controlling {{if}}.
> 1a) {{isPredicateEmpty}} should use an || in the getSlice_range predicate rather than &&.
> 2) In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{ros}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3450) maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null

Posted by "Lanny Ripple (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143547#comment-13143547 ] 

Lanny Ripple commented on CASSANDRA-3450:
-----------------------------------------

Don't have the time to work this up formally but here's a suggested fix.

{noformat}

diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
index 7b4b0d6..13e1fee 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
@@ -234,51 +234,57 @@ public class ColumnFamilyRecordReader extends RecordReader<ByteBuffer, SortedMap
             if (startToken == null)
             {
                 startToken = split.getStartToken();
-            } 
-            else if (startToken.equals(split.getEndToken()))
-            {
-                rows = null;
-                return;
             }
-            
-            KeyRange keyRange = new KeyRange(batchRowCount)
-                                .setStart_token(startToken)
-                                .setEnd_token(split.getEndToken());
-            try
+
+            // The removal of empty CF rows could result in an empty List<KeySlice> rows.
+            // Keep trying until we return on reaching the end of the range or rows is nonEmpty.
+            while (rows == null || rows.isEmpty)
             {
-                rows = client.get_range_slices(new ColumnParent(cfName),
-                                               predicate,
-                                               keyRange,
-                                               consistencyLevel);
-                  
-                // nothing new? reached the end
-                if (rows.isEmpty())
+                if (startToken.equals(split.getEndToken()))
                 {
                     rows = null;
                     return;
                 }
 
-                // Pre-compute the last row key, before removing empty rows
-                ByteBuffer lastRowKey = rows.get(rows.size() - 1).key;
+                KeyRange keyRange = new KeyRange(batchRowCount)
+                                    .setStart_token(startToken)
+                                    .setEnd_token(split.getEndToken());
+                try
+                {
+                    rows = client.get_range_slices(new ColumnParent(cfName),
+                                                   predicate,
+                                                   keyRange,
+                                                   consistencyLevel);
+
+                    // nothing new? reached the end
+                    if (rows.isEmpty())
+                    {
+                        rows = null;
+                        return;
+                    }
+
+                    // Pre-compute the last row key, before removing empty rows
+                    ByteBuffer lastRowKey = rows.get(rows.size() - 1).key;
+
+                    // only remove empty rows if the slice predicate is empty
+                    if (isPredicateEmpty(predicate))
+                    {
+                        Iterator<KeySlice> rowsIterator = rows.iterator();
+                        while (rowsIterator.hasNext())
+                            if (rowsIterator.next().columns.isEmpty())
+                                rowsIterator.remove();
+                    }
 
-                // only remove empty rows if the slice predicate is empty
-                if (isPredicateEmpty(predicate))
+                    // reset to iterate through the new batch
+                    i = 0;
+
+                    // prepare for the next slice to be read
+                    startToken = partitioner.getTokenFactory().toString(partitioner.getToken(lastRowKey));
+                }
+                catch (Exception e)
                 {
-                    Iterator<KeySlice> rowsIterator = rows.iterator();
-                    while (rowsIterator.hasNext())
-                        if (rowsIterator.next().columns.isEmpty())
-                            rowsIterator.remove();
+                    throw new RuntimeException(e);
                 }
-                
-                // reset to iterate through the new batch
-                i = 0;
-
-                // prepare for the next slice to be read
-                startToken = partitioner.getTokenFactory().toString(partitioner.getToken(lastRowKey));
-            }
-            catch (Exception e)
-            {
-                throw new RuntimeException(e);
             }
         }
 
{noformat}
                
> maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3450
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3450
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 1.0.1
>            Reporter: Lanny Ripple
>            Priority: Minor
>
> In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{rows}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3450) maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null

Posted by "Lanny Ripple (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lanny Ripple updated CASSANDRA-3450:
------------------------------------

    Comment: was deleted

(was: Don't have the time to work this up formally but here's a suggested fix.

{noformat}

diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
index 7b4b0d6..13e1fee 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
@@ -234,51 +234,57 @@ public class ColumnFamilyRecordReader extends RecordReader<ByteBuffer, SortedMap
             if (startToken == null)
             {
                 startToken = split.getStartToken();
-            } 
-            else if (startToken.equals(split.getEndToken()))
-            {
-                rows = null;
-                return;
             }
-            
-            KeyRange keyRange = new KeyRange(batchRowCount)
-                                .setStart_token(startToken)
-                                .setEnd_token(split.getEndToken());
-            try
+
+            // The removal of empty CF rows could result in an empty List<KeySlice> rows.
+            // Keep trying until we return on reaching the end of the range or rows is nonEmpty.
+            while (rows == null || rows.isEmpty)
             {
-                rows = client.get_range_slices(new ColumnParent(cfName),
-                                               predicate,
-                                               keyRange,
-                                               consistencyLevel);
-                  
-                // nothing new? reached the end
-                if (rows.isEmpty())
+                if (startToken.equals(split.getEndToken()))
                 {
                     rows = null;
                     return;
                 }
 
-                // Pre-compute the last row key, before removing empty rows
-                ByteBuffer lastRowKey = rows.get(rows.size() - 1).key;
+                KeyRange keyRange = new KeyRange(batchRowCount)
+                                    .setStart_token(startToken)
+                                    .setEnd_token(split.getEndToken());
+                try
+                {
+                    rows = client.get_range_slices(new ColumnParent(cfName),
+                                                   predicate,
+                                                   keyRange,
+                                                   consistencyLevel);
+
+                    // nothing new? reached the end
+                    if (rows.isEmpty())
+                    {
+                        rows = null;
+                        return;
+                    }
+
+                    // Pre-compute the last row key, before removing empty rows
+                    ByteBuffer lastRowKey = rows.get(rows.size() - 1).key;
+
+                    // only remove empty rows if the slice predicate is empty
+                    if (isPredicateEmpty(predicate))
+                    {
+                        Iterator<KeySlice> rowsIterator = rows.iterator();
+                        while (rowsIterator.hasNext())
+                            if (rowsIterator.next().columns.isEmpty())
+                                rowsIterator.remove();
+                    }
 
-                // only remove empty rows if the slice predicate is empty
-                if (isPredicateEmpty(predicate))
+                    // reset to iterate through the new batch
+                    i = 0;
+
+                    // prepare for the next slice to be read
+                    startToken = partitioner.getTokenFactory().toString(partitioner.getToken(lastRowKey));
+                }
+                catch (Exception e)
                 {
-                    Iterator<KeySlice> rowsIterator = rows.iterator();
-                    while (rowsIterator.hasNext())
-                        if (rowsIterator.next().columns.isEmpty())
-                            rowsIterator.remove();
+                    throw new RuntimeException(e);
                 }
-                
-                // reset to iterate through the new batch
-                i = 0;
-
-                // prepare for the next slice to be read
-                startToken = partitioner.getTokenFactory().toString(partitioner.getToken(lastRowKey));
-            }
-            catch (Exception e)
-            {
-                throw new RuntimeException(e);
             }
         }
 
{noformat})
    
> maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3450
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3450
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 1.0.1
>            Reporter: Lanny Ripple
>
> 1) In {{ColumnFamilyRecordReader}} {{isPredicateEmpty}} needs bracing to correctly place the {{else if}} to the properly controlling {{if}}.
> 1a) {{isPredicateEmpty}} should use an || in the getSlice_range predicate rather than &&.
> 2) In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{ros}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3450) maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144470#comment-13144470 ] 

Hudson commented on CASSANDRA-3450:
-----------------------------------

Integrated in Cassandra-0.8 #393 (See [https://builds.apache.org/job/Cassandra-0.8/393/])
    Fix empty row filtering and check if there are no rows returned.
Patch by Lanny Ripple, reviewed by brandonwilliams for CASSANDRA-3450

brandonwilliams : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1197786
Files : 
* /cassandra/branches/cassandra-0.8/CHANGES.txt
* /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java

                
> maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3450
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3450
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 0.8.7, 1.0.1
>            Reporter: Lanny Ripple
>            Assignee: Lanny Ripple
>             Fix For: 0.8.8, 1.0.3
>
>         Attachments: v1-0001-CASSANDRA-3450.txt
>
>
> 1) In {{ColumnFamilyRecordReader}} {{isPredicateEmpty}} needs bracing to correctly place the {{else if}} to the properly controlling {{if}}.
> 1a) {{isPredicateEmpty}} should use an || in the getSlice_range predicate rather than &&.
> 2) In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{ros}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3450) maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null

Posted by "Lanny Ripple (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lanny Ripple updated CASSANDRA-3450:
------------------------------------

       Reviewer:   (was: brandon.williams)
       Priority: Major  (was: Minor)
    Description: 
1) In {{ColumnFamilyRecordReader}} {{isPredicateEmpty}} needs bracing to correctly place the {{else if}} to the properly controlling {{if}}.

1a) {{isPredicateEmpty}} should use an || in the getSlice_range predicate rather than &&.

2) In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{ros}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.



  was:
In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{rows}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.



    
> maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3450
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3450
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 1.0.1
>            Reporter: Lanny Ripple
>
> 1) In {{ColumnFamilyRecordReader}} {{isPredicateEmpty}} needs bracing to correctly place the {{else if}} to the properly controlling {{if}}.
> 1a) {{isPredicateEmpty}} should use an || in the getSlice_range predicate rather than &&.
> 2) In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{ros}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3450) maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null

Posted by "Lanny Ripple (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lanny Ripple updated CASSANDRA-3450:
------------------------------------

    Comment: was deleted

(was: Fix for CASSANDRA-3450.  Passes 'ant test'.)
    
> maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3450
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3450
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 1.0.1
>            Reporter: Lanny Ripple
>              Labels: patch
>
> 1) In {{ColumnFamilyRecordReader}} {{isPredicateEmpty}} needs bracing to correctly place the {{else if}} to the properly controlling {{if}}.
> 1a) {{isPredicateEmpty}} should use an || in the getSlice_range predicate rather than &&.
> 2) In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{ros}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3450) maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null

Posted by "Lanny Ripple (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lanny Ripple updated CASSANDRA-3450:
------------------------------------

    Attachment: v1-0001-CASSANDRA-3450.txt
    
> maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3450
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3450
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 1.0.1
>            Reporter: Lanny Ripple
>              Labels: patch
>         Attachments: v1-0001-CASSANDRA-3450.txt
>
>
> 1) In {{ColumnFamilyRecordReader}} {{isPredicateEmpty}} needs bracing to correctly place the {{else if}} to the properly controlling {{if}}.
> 1a) {{isPredicateEmpty}} should use an || in the getSlice_range predicate rather than &&.
> 2) In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{ros}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3450) maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null

Posted by "Brandon Williams (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams updated CASSANDRA-3450:
----------------------------------------

    Affects Version/s: 0.8.7
        Fix Version/s: 1.0.3
                       0.8.8
    
> maybeInit in ColumnFamilyRecordReader can cause rows to be empty but not null
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3450
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3450
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 0.8.7, 1.0.1
>            Reporter: Lanny Ripple
>             Fix For: 0.8.8, 1.0.3
>
>         Attachments: v1-0001-CASSANDRA-3450.txt
>
>
> 1) In {{ColumnFamilyRecordReader}} {{isPredicateEmpty}} needs bracing to correctly place the {{else if}} to the properly controlling {{if}}.
> 1a) {{isPredicateEmpty}} should use an || in the getSlice_range predicate rather than &&.
> 2) In {{ColumnFamilyRecordReader}} {{computeNext()}} calls {{maybeInit()}} and then if {{ros}} is not null it is indexed into.  {{maybeInit()}} could fetch new data, determine the associated slice predicate is empty, and end up removing all the rows if all columns turned out to be empty.  There is no check for {{rows.isEmpty()}} after the possible removal of all rows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira