Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
darkfrog26 committed Jan 1, 2025
1 parent 19e7b37 commit 79ea9fc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/src/main/scala/lightdb/store/split/SplitStore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,11 @@ case class SplitStore[Doc <: Document[Doc], Model <: DocumentModel[Doc]](overrid
reIndexInternal().map(_ => true)
}

private def reIndexInternal()(implicit transaction: Transaction[Doc]): Task[Unit] = {
// TODO: Process concurrently
searching.truncate().flatMap { _ =>
private def reIndexInternal()(implicit transaction: Transaction[Doc]): Task[Unit] = searching
.truncate()
.flatMap { _ =>
storage.stream.evalMap(searching.insert).drain
}
}

override def dispose(): Task[Unit] = storage.dispose().and(searching.dispose()).unit
}
Expand Down

0 comments on commit 79ea9fc

Please sign in to comment.