You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2011/09/26 18:13:27 UTC
[jira] [Created] (CASSANDRA-3260) MergeIterator assertion on
sources != empty can be thrown
MergeIterator assertion on sources != empty can be thrown
---------------------------------------------------------
Key: CASSANDRA-3260
URL: https://issues.apache.org/jira/browse/CASSANDRA-3260
Project: Cassandra
Issue Type: Bug
Components: Core
Affects Versions: 1.0.0
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Trivial
Fix For: 1.0.0
Attachments: 3260.patch
MergeIterator.get assert that it don't get an empty list of sources. This seems to at least not be the case in the unit test for some of tests (this don't make any test fail however, but there is a few stack trace thrown). I think it's pretty unnatural to "fail" on an empty list of sources and would force every caller to first take the empty case into account, so I propose to just remove that assertion.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3260) MergeIterator assertion on
sources != empty can be thrown
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114775#comment-13114775 ]
Jonathan Ellis commented on CASSANDRA-3260:
-------------------------------------------
Should also then change the next line from
if (sources.size() == 1)
to
if (sources.size() <= 1)
+1 w/ that
> MergeIterator assertion on sources != empty can be thrown
> ---------------------------------------------------------
>
> Key: CASSANDRA-3260
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3260
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.0
> Reporter: Sylvain Lebresne
> Assignee: Sylvain Lebresne
> Priority: Trivial
> Fix For: 1.0.0
>
> Attachments: 3260.patch
>
>
> MergeIterator.get assert that it don't get an empty list of sources. This seems to at least not be the case in the unit test for some of tests (this don't make any test fail however, but there is a few stack trace thrown). I think it's pretty unnatural to "fail" on an empty list of sources and would force every caller to first take the empty case into account, so I propose to just remove that assertion.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3260) MergeIterator assertion on
sources != empty can be thrown
Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115453#comment-13115453 ]
Jonathan Ellis commented on CASSANDRA-3260:
-------------------------------------------
+1
> MergeIterator assertion on sources != empty can be thrown
> ---------------------------------------------------------
>
> Key: CASSANDRA-3260
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3260
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.0
> Reporter: Sylvain Lebresne
> Assignee: Sylvain Lebresne
> Priority: Trivial
> Fix For: 1.0.0
>
> Attachments: 3260.patch, 3260_v2.patch
>
>
> MergeIterator.get assert that it don't get an empty list of sources. This seems to at least not be the case in the unit test for some of tests (this don't make any test fail however, but there is a few stack trace thrown). I think it's pretty unnatural to "fail" on an empty list of sources and would force every caller to first take the empty case into account, so I propose to just remove that assertion.
--
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-3260) MergeIterator assertion on
sources != empty can be thrown
Posted by "Sylvain Lebresne (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sylvain Lebresne updated CASSANDRA-3260:
----------------------------------------
Attachment: 3260_v2.patch
Hum, I don't think that works because both OneToOne and TrivialOneToOne constructors do sources.get(0), so that should stay a == 1.
The initial idea was to use the manyToOne that works fine will an empty list of sources, but attaching an alternative v2 that adds a simple EmptyIterator for the empty case.
> MergeIterator assertion on sources != empty can be thrown
> ---------------------------------------------------------
>
> Key: CASSANDRA-3260
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3260
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.0
> Reporter: Sylvain Lebresne
> Assignee: Sylvain Lebresne
> Priority: Trivial
> Fix For: 1.0.0
>
> Attachments: 3260.patch, 3260_v2.patch
>
>
> MergeIterator.get assert that it don't get an empty list of sources. This seems to at least not be the case in the unit test for some of tests (this don't make any test fail however, but there is a few stack trace thrown). I think it's pretty unnatural to "fail" on an empty list of sources and would force every caller to first take the empty case into account, so I propose to just remove that assertion.
--
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-3260) MergeIterator assertion on
sources != empty can be thrown
Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sylvain Lebresne updated CASSANDRA-3260:
----------------------------------------
Attachment: 3260.patch
> MergeIterator assertion on sources != empty can be thrown
> ---------------------------------------------------------
>
> Key: CASSANDRA-3260
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3260
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.0
> Reporter: Sylvain Lebresne
> Assignee: Sylvain Lebresne
> Priority: Trivial
> Fix For: 1.0.0
>
> Attachments: 3260.patch
>
>
> MergeIterator.get assert that it don't get an empty list of sources. This seems to at least not be the case in the unit test for some of tests (this don't make any test fail however, but there is a few stack trace thrown). I think it's pretty unnatural to "fail" on an empty list of sources and would force every caller to first take the empty case into account, so I propose to just remove that assertion.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3260) MergeIterator assertion on
sources != empty can be thrown
Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115454#comment-13115454 ]
Jonathan Ellis commented on CASSANDRA-3260:
-------------------------------------------
TBH worrying about the empty case is probably premature optimization, so I'm fine w/ committing either one.
> MergeIterator assertion on sources != empty can be thrown
> ---------------------------------------------------------
>
> Key: CASSANDRA-3260
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3260
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.0
> Reporter: Sylvain Lebresne
> Assignee: Sylvain Lebresne
> Priority: Trivial
> Fix For: 1.0.0
>
> Attachments: 3260.patch, 3260_v2.patch
>
>
> MergeIterator.get assert that it don't get an empty list of sources. This seems to at least not be the case in the unit test for some of tests (this don't make any test fail however, but there is a few stack trace thrown). I think it's pretty unnatural to "fail" on an empty list of sources and would force every caller to first take the empty case into account, so I propose to just remove that assertion.
--
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