You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by gi...@apache.org on 2024/06/16 00:05:39 UTC
(pekko-persistence-cassandra) branch update/scalafmt-core-3.8.2 created (now fe477b1)
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a change to branch update/scalafmt-core-3.8.2
in repository https://gitbox.apache.org/repos/asf/pekko-persistence-cassandra.git
at fe477b1 Add 'Reformat with scalafmt 3.8.2' to .git-blame-ignore-revs
This branch includes the following new commits:
new 76a0efc Update scalafmt-core to 3.8.2
new cf9f691 Reformat with scalafmt 3.8.2
new fe477b1 Add 'Reformat with scalafmt 3.8.2' to .git-blame-ignore-revs
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org
(pekko-persistence-cassandra) 02/03: Reformat with scalafmt 3.8.2
Posted by gi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch update/scalafmt-core-3.8.2
in repository https://gitbox.apache.org/repos/asf/pekko-persistence-cassandra.git
commit cf9f6913fff41bfc46cba59718ad46aa9e2965cb
Author: scala-steward-asf[bot] <14...@users.noreply.github.com>
AuthorDate: Sun Jun 16 00:05:34 2024 +0000
Reformat with scalafmt 3.8.2
Executed command: scalafmt --non-interactive
---
.../query/EventsByPersistenceIdStage.scala | 6 ++++--
.../cassandra/query/EventsByTagStage.scala | 18 ++++++++--------
.../cassandra/CassandraEventsByTagLoadSpec.scala | 3 ++-
.../cassandra/CassandraPluginSettingsSpec.scala | 25 ++++------------------
.../cassandra/journal/TagWriterSpec.scala | 3 +--
5 files changed, 20 insertions(+), 35 deletions(-)
diff --git a/core/src/main/scala/org/apache/pekko/persistence/cassandra/query/EventsByPersistenceIdStage.scala b/core/src/main/scala/org/apache/pekko/persistence/cassandra/query/EventsByPersistenceIdStage.scala
index c96b425..14278e1 100644
--- a/core/src/main/scala/org/apache/pekko/persistence/cassandra/query/EventsByPersistenceIdStage.scala
+++ b/core/src/main/scala/org/apache/pekko/persistence/cassandra/query/EventsByPersistenceIdStage.scala
@@ -413,10 +413,12 @@ import scala.util.{ Failure, Success, Try }
} else {
val row = rs.one()
val sequenceNr = extractSeqNr(row)
- if ((sequenceNr < expectedNextSeqNr && fastForwardEnabled) || pendingFastForward.isDefined && pendingFastForward.get > sequenceNr) {
+ if ((sequenceNr < expectedNextSeqNr && fastForwardEnabled) || pendingFastForward
+ .isDefined && pendingFastForward.get > sequenceNr) {
// skip event due to fast forward
tryPushOne()
- } else if (pendingFastForward.isEmpty && querySettings.gapFreeSequenceNumbers && sequenceNr > expectedNextSeqNr) {
+ } else if (pendingFastForward.isEmpty && querySettings
+ .gapFreeSequenceNumbers && sequenceNr > expectedNextSeqNr) {
// we will probably now come in here which isn't what we want
lookingForMissingSeqNr match {
case Some(_) =>
diff --git a/core/src/main/scala/org/apache/pekko/persistence/cassandra/query/EventsByTagStage.scala b/core/src/main/scala/org/apache/pekko/persistence/cassandra/query/EventsByTagStage.scala
index d682cbd..1267bd0 100644
--- a/core/src/main/scala/org/apache/pekko/persistence/cassandra/query/EventsByTagStage.scala
+++ b/core/src/main/scala/org/apache/pekko/persistence/cassandra/query/EventsByTagStage.scala
@@ -532,7 +532,8 @@ import scala.util.{ Failure, Success, Try }
{ (attempt, t, nextRetry) =>
if (log.isWarningEnabled) {
log.warning(
- s"[{}] Query failed. timeBucket: {} from offset: {} to offset: {}. Attempt ${attempt}. Next retry in: ${nextRetry.pretty}. Reason: ${t.getMessage}",
+ s"[{}] Query failed. timeBucket: {} from offset: {} to offset: {}. Attempt ${attempt}. Next retry in: ${nextRetry
+ .pretty}. Reason: ${t.getMessage}",
stageUuid,
stageState.currentTimeBucket,
formatOffset(stageState.fromOffset),
@@ -574,7 +575,8 @@ import scala.util.{ Failure, Success, Try }
{ (attempt, t, nextRetry) =>
if (log.isWarningEnabled) {
log.warning(
- s"[{}] Looking for missing query failed. timeBucket: {} from offset: {} to offset: {}. Attempt ${attempt}. Next retry in: ${nextRetry.pretty}. Reason: ${t.getMessage}",
+ s"[{}] Looking for missing query failed. timeBucket: {} from offset: {} to offset: {}. Attempt ${attempt}. Next retry in: ${nextRetry
+ .pretty}. Reason: ${t.getMessage}",
stageUuid,
stageState.currentTimeBucket,
formatOffset(stageState.fromOffset),
@@ -660,7 +662,8 @@ import scala.util.{ Failure, Success, Try }
.tagPidSequenceNumberUpdate(repr.persistenceId, (1, repr.offset, System.currentTimeMillis())))
push(out, repr)
false
- } else if (usingOffset && (stageState.currentTimeBucket.inPast || eventsByTagSettings.newPersistenceIdScanTimeout == Duration.Zero)) {
+ } else if (usingOffset && (stageState.currentTimeBucket.inPast || eventsByTagSettings
+ .newPersistenceIdScanTimeout == Duration.Zero)) {
// If we're in the past and this is an offset query we assume this is
// the first tagPidSequenceNr
log.debug(
@@ -671,8 +674,7 @@ import scala.util.{ Failure, Success, Try }
repr.tagPidSequenceNr)
updateStageState(
_.copy(fromOffset = repr.offset).tagPidSequenceNumberUpdate(
- repr.persistenceId,
- (repr.tagPidSequenceNr, repr.offset, System.currentTimeMillis())))
+ repr.persistenceId, (repr.tagPidSequenceNr, repr.offset, System.currentTimeMillis())))
push(out, repr)
false
} else {
@@ -751,8 +753,7 @@ import scala.util.{ Failure, Success, Try }
repr.tagPidSequenceNr)
updateStageState(
_.copy(fromOffset = repr.offset).tagPidSequenceNumberUpdate(
- repr.persistenceId,
- (expectedSequenceNr, repr.offset, System.currentTimeMillis())))
+ repr.persistenceId, (expectedSequenceNr, repr.offset, System.currentTimeMillis())))
push(out, repr)
false
}
@@ -949,8 +950,7 @@ import scala.util.{ Failure, Success, Try }
case (acc, (pid, missingData)) =>
log.debug("Updating tag pid sequence nr for pid {} to {}", pid, missingData.maxSequenceNr)
acc.tagPidSequenceNumberUpdate(
- pid,
- (missingData.maxSequenceNr, missingData.maxOffset, System.currentTimeMillis()))
+ pid, (missingData.maxSequenceNr, missingData.maxOffset, System.currentTimeMillis()))
}
})
}
diff --git a/core/src/test/scala/org/apache/pekko/persistence/cassandra/CassandraEventsByTagLoadSpec.scala b/core/src/test/scala/org/apache/pekko/persistence/cassandra/CassandraEventsByTagLoadSpec.scala
index ff31bfa..ee76f67 100644
--- a/core/src/test/scala/org/apache/pekko/persistence/cassandra/CassandraEventsByTagLoadSpec.scala
+++ b/core/src/test/scala/org/apache/pekko/persistence/cassandra/CassandraEventsByTagLoadSpec.scala
@@ -106,7 +106,8 @@ class CassandraEventsByTagLoadSpec extends CassandraSpec(CassandraEventsByTagLoa
if (event.sequenceNr != currentSeqNr + 1) {
fail = true
system.log.error(
- s"Out of order sequence nrs for pid ${event.persistenceId}. This was event nr [$i]. Expected ${currentSeqNr + 1}, got: ${event.sequenceNr}")
+ s"Out of order sequence nrs for pid ${event
+ .persistenceId}. This was event nr [$i]. Expected ${currentSeqNr + 1}, got: ${event.sequenceNr}")
}
sequenceNrsPerPid += (event.persistenceId -> event.sequenceNr)
case None =>
diff --git a/core/src/test/scala/org/apache/pekko/persistence/cassandra/CassandraPluginSettingsSpec.scala b/core/src/test/scala/org/apache/pekko/persistence/cassandra/CassandraPluginSettingsSpec.scala
index bbe4751..e155545 100644
--- a/core/src/test/scala/org/apache/pekko/persistence/cassandra/CassandraPluginSettingsSpec.scala
+++ b/core/src/test/scala/org/apache/pekko/persistence/cassandra/CassandraPluginSettingsSpec.scala
@@ -38,27 +38,10 @@ class CassandraPluginSettingsSpec
def maxKey = Random.alphanumeric.dropWhile(_.toString.matches("[^a-zA-Z]")).take(48).mkString
Table(
- ("Keyspace", "isValid"),
- ("test", true),
- ("_test_123", false),
- ("", false),
- ("test-space", false),
- ("'test'", false),
- ("a", true),
- ("a_", true),
- ("1", false),
- ("a1", true),
- ("_", false),
- ("asdf!", false),
- (maxKey, true),
- ("\"_asdf\"", false),
- ("\"_\"", false),
- ("\"a\"", true),
- ("\"a_sdf\"", true),
- ("\"\"", false),
- ("\"valid_with_quotes\"", true),
- ("\"missing_trailing_quote", false),
- ("missing_leading_quote\"", false),
+ ("Keyspace", "isValid"), ("test", true), ("_test_123", false), ("", false), ("test-space", false),
+ ("'test'", false), ("a", true), ("a_", true), ("1", false), ("a1", true), ("_", false), ("asdf!", false),
+ (maxKey, true), ("\"_asdf\"", false), ("\"_\"", false), ("\"a\"", true), ("\"a_sdf\"", true), ("\"\"", false),
+ ("\"valid_with_quotes\"", true), ("\"missing_trailing_quote", false), ("missing_leading_quote\"", false),
('"'.toString + maxKey + '"'.toString, true), // using interpolation here breaks scalafmt :-/
(maxKey + "_", false))
}
diff --git a/core/src/test/scala/org/apache/pekko/persistence/cassandra/journal/TagWriterSpec.scala b/core/src/test/scala/org/apache/pekko/persistence/cassandra/journal/TagWriterSpec.scala
index 7917850..ae233dc 100644
--- a/core/src/test/scala/org/apache/pekko/persistence/cassandra/journal/TagWriterSpec.scala
+++ b/core/src/test/scala/org/apache/pekko/persistence/cassandra/journal/TagWriterSpec.scala
@@ -509,8 +509,7 @@ class TagWriterSpec
ref ! TagWrite(tagName, Vector(p2e1))
probe.expectNoMessage(waitDuration)
system.log.debug(
- "Persisting events in bucket: {} and: {}",
- (p1e1.timeBucket, formatOffset(p1e1.timeUuid)),
+ "Persisting events in bucket: {} and: {}", (p1e1.timeBucket, formatOffset(p1e1.timeUuid)),
(p1e2.timeBucket, p1e2.timeUuid))
ref ! TagWrite(tagName, Vector(p1e1, p1e2))
probe.expectMsg(Vector(toEw(p1e1, 1), toEw(p1e2, 2)))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org
(pekko-persistence-cassandra) 03/03: Add 'Reformat with scalafmt 3.8.2' to .git-blame-ignore-revs
Posted by gi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch update/scalafmt-core-3.8.2
in repository https://gitbox.apache.org/repos/asf/pekko-persistence-cassandra.git
commit fe477b10f6123f6869153a48c0414e3319d7271f
Author: scala-steward-asf[bot] <14...@users.noreply.github.com>
AuthorDate: Sun Jun 16 00:05:34 2024 +0000
Add 'Reformat with scalafmt 3.8.2' to .git-blame-ignore-revs
---
.git-blame-ignore-revs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index c155d26..06c225e 100644
--- a/.git-blame-ignore-revs
+++ b/.git-blame-ignore-revs
@@ -7,3 +7,6 @@ b38615bf1e3a0e85cdcf7941c2a2f7562b893ede
# javafmt
869800d7424a5665fdbfb8530f453e37335b1f25
+
+# Scala Steward: Reformat with scalafmt 3.8.2
+cf9f6913fff41bfc46cba59718ad46aa9e2965cb
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org
(pekko-persistence-cassandra) 01/03: Update scalafmt-core to 3.8.2
Posted by gi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch update/scalafmt-core-3.8.2
in repository https://gitbox.apache.org/repos/asf/pekko-persistence-cassandra.git
commit 76a0efc28f6172a88133aa531e6c3ff43a28bffb
Author: scala-steward-asf[bot] <14...@users.noreply.github.com>
AuthorDate: Sun Jun 16 00:05:26 2024 +0000
Update scalafmt-core to 3.8.2
---
.scalafmt.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.scalafmt.conf b/.scalafmt.conf
index 6395bba..0f01312 100644
--- a/.scalafmt.conf
+++ b/.scalafmt.conf
@@ -1,4 +1,4 @@
-version = 3.8.1
+version = 3.8.2
runner.dialect = scala213
project.git = true
style = defaultWithAlign
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org