Skip to content

Commit

Permalink
Debug code was uncommented added.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii0lomakin committed Jan 3, 2024
1 parent 8834b48 commit 86c0c7e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions environment/src/main/kotlin/jetbrains/exodus/gc/GarbageCollector.kt
Original file line number Diff line number Diff line change
Expand Up @@ -358,21 +358,21 @@ class GarbageCollector(internal val environment: EnvironmentImpl) {
)
}

// val addresses = TreeSet<Long>()
// val lastAddress = 520806596608L + log.cachePageSize
val addresses = TreeSet<Long>()
val lastAddress = 520806596608L + log.cachePageSize

try {
val nextFileAddress = fileAddress + log.fileLengthBound
val loggables = log.getLoggableIterator(fileAddress)
while (loggables.hasNext()) {
val loggable = loggables.next()

// if (loggable.address >= 520806596608L && loggable.address <= lastAddress) {
// addresses.add(loggable.address)
// }
// if (loggable.address == 520806663897L) {
// println("Caught you !")
// }
if (loggable.address >= 520806596608L && loggable.address <= lastAddress) {
addresses.add(loggable.address)
}
if (loggable.address == 520806663897L) {
println("Caught you !")
}

if (loggable == null || loggable.address >= nextFileAddress) {
break
Expand All @@ -394,8 +394,8 @@ class GarbageCollector(internal val environment: EnvironmentImpl) {
throw e
}

// val lastProccessedAddress = addresses.floor(520806663921L)
// println("lastProccessedAddress: $lastProccessedAddress")
val lastProccessedAddress = addresses.floor(520806663921L)
println("lastProccessedAddress: $lastProccessedAddress")
}

companion object : KLogging() {
Expand Down

0 comments on commit 86c0c7e

Please sign in to comment.