Skip to content

Commit

Permalink
Explicitly set batch type UNLOGGED (akka#827)
Browse files Browse the repository at this point in the history
  • Loading branch information
raboof committed Oct 12, 2020
1 parent 68b2f21 commit 6673fef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ class CassandraJournal(cfg: Config)
}

private def executeBatch(body: BatchStatement => Unit, retryPolicy: RetryPolicy): Future[Unit] = {
val batch = new BatchStatement()
val batch = new BatchStatement(BatchStatement.Type.UNLOGGED)
.setConsistencyLevel(writeConsistency)
.setRetryPolicy(retryPolicy)
.asInstanceOf[BatchStatement]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ class CassandraSnapshotStore(cfg: Config)
}

def executeBatch(body: BatchStatement => Unit): Future[Unit] = {
val batch = new BatchStatement().setConsistencyLevel(writeConsistency).asInstanceOf[BatchStatement]
val batch = new BatchStatement(BatchStatement.Type.UNLOGGED)
.setConsistencyLevel(writeConsistency)
.asInstanceOf[BatchStatement]
body(batch)
session.underlying().flatMap(_.executeAsync(batch)).map(_ => ())
}
Expand Down

0 comments on commit 6673fef

Please sign in to comment.