Class CommitLogSegmentManagerCDC

    • Constructor Detail

      • CommitLogSegmentManagerCDC

        public CommitLogSegmentManagerCDC​(CommitLog commitLog,
                                          java.lang.String storageDirectory)
    • Method Detail

      • deleteOldLinkedCDCCommitLogSegment

        public long deleteOldLinkedCDCCommitLogSegment​(long bytesToFree)
        Delete the oldest hard-linked CDC commit log segment to free up space.
        Parameters:
        bytesToFree - the minimum space to free up
        Returns:
        total size under the CDC folder in bytes after deletion
      • shutdown

        public void shutdown()
        Initiates the shutdown process for the management thread. Also stops the cdc on-disk size calculator executor.
        Overrides:
        shutdown in class AbstractCommitLogSegmentManager
      • allocate

        public CommitLogSegment.Allocation allocate​(Mutation mutation,
                                                    int size)
                                             throws CDCWriteException
        Reserve space in the current segment for the provided mutation or, if there isn't space available, create a new segment. For CDC mutations, allocation is expected to throw WTE if the segment disallows CDC mutations.
        Specified by:
        allocate in class AbstractCommitLogSegmentManager
        Parameters:
        mutation - Mutation to allocate in segment manager
        size - total size (overhead + serialized) of mutation
        Returns:
        the created Allocation object
        Throws:
        CDCWriteException - If segment disallows CDC mutations, we throw
      • createSegment

        public CommitLogSegment createSegment()
        On segment creation, flag whether the segment should accept CDC mutations or not based on the total currently allocated unflushed CDC segments and the contents of cdc_raw Synchronized on this
        Overrides:
        createSegment in class AbstractCommitLogSegmentManager
      • addCDCSize

        public void addCDCSize​(long size)
        For use after replay when replayer hard-links / adds tracking of replayed segments
      • updateCDCTotalSize

        public long updateCDCTotalSize()
        Only use for testing / validation that size tracker is working. Not for production use.