Bookkeeper
  1. Bookkeeper
  2. BOOKKEEPER-188

Garbage collection code is in the wrong place

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.0
    • Component/s: None
    • Labels:
      None

      Description

      There's a lot of garbage collection code in the wrong place in EntryLogger. extractMetaFromEntryLogs, and EntryLogMetadata are only every used in the GC Thread. So they should move there.

        Activity

        Ivan Kelly created issue -
        Hide
        Ivan Kelly added a comment -

        This is a very straight forward refactor. The one functional change is that extractMetaFromEntryLogs now call extractMetaFromEntryLog rather than having duplicate logic in each.

        Show
        Ivan Kelly added a comment - This is a very straight forward refactor. The one functional change is that extractMetaFromEntryLogs now call extractMetaFromEntryLog rather than having duplicate logic in each.
        Ivan Kelly made changes -
        Field Original Value New Value
        Attachment BOOKKEEPER-188.diff [ 12519084 ]
        Ivan Kelly made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4414/
        -----------------------------------------------------------

        Review request for bookkeeper.

        Summary
        -------

        This is a very straight forward refactor. The one functional change is that extractMetaFromEntryLogs now call extractMetaFromEntryLog rather than having duplicate logic in each.

        This addresses bug BOOKKEEPER-188.
        https://issues.apache.org/jira/browse/BOOKKEEPER-188

        Diffs


        bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java 8da372e
        bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java 23f02bc
        bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/EntryLogTest.java 96df89a

        Diff: https://reviews.apache.org/r/4414/diff

        Testing
        -------

        Thanks,

        Ivan

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4414/ ----------------------------------------------------------- Review request for bookkeeper. Summary ------- This is a very straight forward refactor. The one functional change is that extractMetaFromEntryLogs now call extractMetaFromEntryLog rather than having duplicate logic in each. This addresses bug BOOKKEEPER-188 . https://issues.apache.org/jira/browse/BOOKKEEPER-188 Diffs bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java 8da372e bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java 23f02bc bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/EntryLogTest.java 96df89a Diff: https://reviews.apache.org/r/4414/diff Testing ------- Thanks, Ivan
        Hide
        Sijie Guo added a comment -

        +1 for the patch, will commit it.

        Show
        Sijie Guo added a comment - +1 for the patch, will commit it.
        Hide
        Sijie Guo added a comment -

        committed as r1303286. thanks Ivan.

        Show
        Sijie Guo added a comment - committed as r1303286. thanks Ivan.
        Sijie Guo made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in bookkeeper-trunk #420 (See https://builds.apache.org/job/bookkeeper-trunk/420/)
        BOOKKEEPER-188: Garbage collection code is in the wrong place (ivank via sijie) (Revision 1303286)

        Result = ABORTED
        sijie :
        Files :

        • /zookeeper/bookkeeper/trunk/CHANGES.txt
        • /zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
        • /zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java
        • /zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/EntryLogTest.java
        Show
        Hudson added a comment - Integrated in bookkeeper-trunk #420 (See https://builds.apache.org/job/bookkeeper-trunk/420/ ) BOOKKEEPER-188 : Garbage collection code is in the wrong place (ivank via sijie) (Revision 1303286) Result = ABORTED sijie : Files : /zookeeper/bookkeeper/trunk/CHANGES.txt /zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java /zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java /zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/EntryLogTest.java
        Ivan Kelly made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        5m 7s 1 Ivan Kelly 20/Mar/12 15:15
        Patch Available Patch Available Resolved Resolved
        13h 58m 1 Sijie Guo 21/Mar/12 05:14
        Resolved Resolved Closed Closed
        215d 9h 36m 1 Ivan Kelly 22/Oct/12 15:50

          People

          • Assignee:
            Ivan Kelly
            Reporter:
            Ivan Kelly
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development