You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Chris Goffinet (JIRA)" <ji...@apache.org> on 2009/08/03 04:39:14 UTC

[jira] Created: (CASSANDRA-335) Temp SSTable Generation increases by two, instead of one

Temp SSTable Generation increases by two, instead of one
--------------------------------------------------------

                 Key: CASSANDRA-335
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-335
             Project: Cassandra
          Issue Type: Bug
    Affects Versions: 0.4
            Reporter: Chris Goffinet
            Assignee: Chris Goffinet
            Priority: Trivial
             Fix For: 0.4


String getTempSSTableFileName()
    {
        fileIndexGenerator_.incrementAndGet();

        return String.format("%s-%s-%s-Data.db",
                             columnFamily_, SSTable.TEMPFILE_MARKER, fileIndexGenerator_.incrementAndGet());
    }

It's incrementing twice. Remove the first one since the return is already calling it.

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


[jira] Commented: (CASSANDRA-335) Temp SSTable Generation increases by two, instead of one

Posted by "Bill de hOra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738515#action_12738515 ] 

Bill de hOra commented on CASSANDRA-335:
----------------------------------------

{quote}IIRC this is actually done on purpose{quote}

and the comment is above one of the places where it's called (L359 in ColumnFamilyStore). Is calling fileIndexGenerator_ twice supposed to be an atomic op, or can it be interleaved?


> Temp SSTable Generation increases by two, instead of one
> --------------------------------------------------------
>
>                 Key: CASSANDRA-335
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-335
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.4
>            Reporter: Chris Goffinet
>            Priority: Trivial
>             Fix For: 0.4
>
>
> String getTempSSTableFileName()
>     {
>         fileIndexGenerator_.incrementAndGet();
>         return String.format("%s-%s-%s-Data.db",
>                              columnFamily_, SSTable.TEMPFILE_MARKER, fileIndexGenerator_.incrementAndGet());
>     }
> It's incrementing twice. Remove the first one since the return is already calling it.

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


[jira] Resolved: (CASSANDRA-335) Temp SSTable Generation increases by two, instead of one

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

Jonathan Ellis resolved CASSANDRA-335.
--------------------------------------

    Resolution: Invalid
      Assignee:     (was: Chris Goffinet)

IIRC this is actually done on purpose, so you can just pick max(sstables being merged) + 1 for the compaction sstable id.

> Temp SSTable Generation increases by two, instead of one
> --------------------------------------------------------
>
>                 Key: CASSANDRA-335
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-335
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.4
>            Reporter: Chris Goffinet
>            Priority: Trivial
>             Fix For: 0.4
>
>
> String getTempSSTableFileName()
>     {
>         fileIndexGenerator_.incrementAndGet();
>         return String.format("%s-%s-%s-Data.db",
>                              columnFamily_, SSTable.TEMPFILE_MARKER, fileIndexGenerator_.incrementAndGet());
>     }
> It's incrementing twice. Remove the first one since the return is already calling it.

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


[jira] Updated: (CASSANDRA-335) Temp SSTable Generation increases by two, instead of one

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

Michael Greene updated CASSANDRA-335:
-------------------------------------

    Component/s: Core

> Temp SSTable Generation increases by two, instead of one
> --------------------------------------------------------
>
>                 Key: CASSANDRA-335
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-335
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.4
>            Reporter: Chris Goffinet
>            Priority: Trivial
>             Fix For: 0.4
>
>         Attachments: CASSANDRA-335.patch
>
>
> String getTempSSTableFileName()
>     {
>         fileIndexGenerator_.incrementAndGet();
>         return String.format("%s-%s-%s-Data.db",
>                              columnFamily_, SSTable.TEMPFILE_MARKER, fileIndexGenerator_.incrementAndGet());
>     }
> It's incrementing twice. Remove the first one since the return is already calling it.

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


[jira] Commented: (CASSANDRA-335) Temp SSTable Generation increases by two, instead of one

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

Jonathan Ellis commented on CASSANDRA-335:
------------------------------------------

> Is calling fileIndexGenerator_ twice supposed to be an atomic op, or can it be interleaved? 

only one thread calls it, so this is immaterial.

> make the code's intent to incr twice clear; current getTempSSTablePath looks like a bug 

done this morning as part of the 213 patch series

> Temp SSTable Generation increases by two, instead of one
> --------------------------------------------------------
>
>                 Key: CASSANDRA-335
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-335
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.4
>            Reporter: Chris Goffinet
>            Priority: Trivial
>             Fix For: 0.4
>
>         Attachments: CASSANDRA-335.patch
>
>
> String getTempSSTableFileName()
>     {
>         fileIndexGenerator_.incrementAndGet();
>         return String.format("%s-%s-%s-Data.db",
>                              columnFamily_, SSTable.TEMPFILE_MARKER, fileIndexGenerator_.incrementAndGet());
>     }
> It's incrementing twice. Remove the first one since the return is already calling it.

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


[jira] Updated: (CASSANDRA-335) Temp SSTable Generation increases by two, instead of one

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

Bill de hOra updated CASSANDRA-335:
-----------------------------------

    Attachment: CASSANDRA-335.patch

make the code's intent to incr twice clear; current getTempSSTablePath looks like a bug

> Temp SSTable Generation increases by two, instead of one
> --------------------------------------------------------
>
>                 Key: CASSANDRA-335
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-335
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.4
>            Reporter: Chris Goffinet
>            Priority: Trivial
>             Fix For: 0.4
>
>         Attachments: CASSANDRA-335.patch
>
>
> String getTempSSTableFileName()
>     {
>         fileIndexGenerator_.incrementAndGet();
>         return String.format("%s-%s-%s-Data.db",
>                              columnFamily_, SSTable.TEMPFILE_MARKER, fileIndexGenerator_.incrementAndGet());
>     }
> It's incrementing twice. Remove the first one since the return is already calling it.

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


[jira] Issue Comment Edited: (CASSANDRA-335) Temp SSTable Generation increases by two, instead of one

Posted by "Bill de hOra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738515#action_12738515 ] 

Bill de hOra edited comment on CASSANDRA-335 at 8/3/09 12:30 PM:
-----------------------------------------------------------------

"IIRC this is actually done on purpose"

and the comment is above one of the places where it's called (L359 in ColumnFamilyStore). Is calling fileIndexGenerator_ twice supposed to be an atomic op, or can it be interleaved?


      was (Author: dehora):
    {quote}IIRC this is actually done on purpose{quote}

and the comment is above one of the places where it's called (L359 in ColumnFamilyStore). Is calling fileIndexGenerator_ twice supposed to be an atomic op, or can it be interleaved?

  
> Temp SSTable Generation increases by two, instead of one
> --------------------------------------------------------
>
>                 Key: CASSANDRA-335
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-335
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.4
>            Reporter: Chris Goffinet
>            Priority: Trivial
>             Fix For: 0.4
>
>
> String getTempSSTableFileName()
>     {
>         fileIndexGenerator_.incrementAndGet();
>         return String.format("%s-%s-%s-Data.db",
>                              columnFamily_, SSTable.TEMPFILE_MARKER, fileIndexGenerator_.incrementAndGet());
>     }
> It's incrementing twice. Remove the first one since the return is already calling it.

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