• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

evolution-gaming / kafka-journal / 11401243087
94%

Build:
DEFAULT BRANCH: master
Ran 18 Oct 2024 09:40AM UTC
Jobs 1
Files 182
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Oct 2024 09:34AM UTC coverage: 83.142% (-0.2%) from 83.316%
11401243087

push

web-flow
optimization of `append + delete` actions leads to inconsistent state in metajournal table (#676)

We optimize actions to reduce load on Cassandra when in single poll we
get actions like:
* append @ 5
* append @ 6
* delete till 6

Optimization removed previous append actions, when `delete` would remove
them after insertion.

The optimization keeps the `journal` table in shape, but it fails to
update `metajournal` table, like when:
* `metajournal` table has entry with `deleteTo: 4; seqNr: 4`
* after receiving above-mentioned batch, we update `deleteTo` to `4` and
`seqNr` stays as it was
* result is that we have `deleteTo: 4; seqNr: 4` (as `DeleteTo` got
clamped down to existing `seqNr` to not overshoot future events in
journal) - we lost updates: `seqNr: 6` and didn't update `deleteTo: 6`

This happens rarely, usually when client is quiet for some time and then
issues "closing" statements.

As this optimization drops `append @ 6`, it misses update of
`expire_after` column in Cassandra.

13 of 15 new or added lines in 1 file covered. (86.67%)

12 existing lines in 11 files now uncovered.

3181 of 3826 relevant lines covered (83.14%)

1.4 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
96.49
-3.51% replicator/src/main/scala/com/evolutiongaming/kafka/journal/replicator/Batch.scala

Uncovered Existing Lines

Lines Coverage ∆ File
1
75.0
-25.0% core/src/main/scala/com/evolutiongaming/kafka/journal/FromJsResult.scala
1
84.62
-7.69% replicator/src/main/scala/com/evolutiongaming/kafka/journal/replicator/CacheOf.scala
1
96.43
-3.57% journal/src/main/scala/com/evolutiongaming/kafka/journal/HeadCacheConsumption.scala
1
83.61
-1.64% journal/src/main/scala/com/evolutiongaming/kafka/journal/eventual/ReplicatedJournal.scala
1
80.0
1.67% replicator/src/main/scala/com/evolutiongaming/kafka/journal/replicator/ReplicateRecords.scala
1
83.78
-2.7% journal/src/main/scala/com/evolutiongaming/kafka/journal/HeadInfo.scala
1
50.0
-50.0% core/src/main/scala/com/evolutiongaming/kafka/journal/FromConfigReaderResult.scala
1
92.31
-3.85% cassandra/src/main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/CassandraSession.scala
1
81.82
-9.09% core/src/main/scala/com/evolutiongaming/kafka/journal/Key.scala
1
83.33
-5.56% snapshot/src/main/scala/com/evolutiongaming/kafka/journal/BufferNr.scala
2
52.38
-9.52% core/src/main/scala/com/evolutiongaming/kafka/journal/util/ScodecHelper.scala
Jobs
ID Job ID Ran Files Coverage
1 Scala 2.13.15 - 11401243087.1 18 Oct 2024 09:40AM UTC 182
83.14
Source Files on build 11401243087
  • Tree
  • List 182
  • Changed 45
  • Source Changed 1
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 2388e29f on github
  • Prev Build on master (#11342554274)
  • Next Build on master (#11533432262)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc