apache / apache/pekko-projection

SlickProjectionSpec: A Slick grouped projection must restart from previous offset - handler throwing an exception, save after 2

Open
#192 0 comments 0 reactions 0 assignees View on GitHub
flaky test
Dominant language
Scala
Stars
27
Forks
16
Avg merge
1d 4h
Merged PRs (30d)
15

Description

https://github.com/apache/pekko-projection/actions/runs/10040359450/job/27746257858

Notably:

```
org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: NULL not allowed for column "CONCATENATED"; SQL statement:
merge into "TEST_MODEL" ("ID","CONCATENATED") values (?,?) [23502-224]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:520)
```
and
```
[info] check: last seen offset is 2L The Option on which value was invoked was not defined. (SlickProjectionSpec.scala:953)
[info] org.scalatest.exceptions.TestFailedException:
[info] at org.scalatest.OptionValues$OptionValuable.value(OptionValues.scala:114)
[info] at org.apache.pekko.projection.slick.SlickProjectionSpec.f$proxy17$1$$anonfun$4(SlickProjectionSpec.scala:953)
[info] at org.scalatest.Assertions.withClue(Assertions.scala:1208)
[info] at org.scalatest.Assertions.withClue$(Assertions.scala:421)
[info] at org.apache.pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit.withClue(ScalaTestWithActorTestKit.scala:41)
[info] at org.apache.pekko.projection.slick.SlickProjectionSpec.f$proxy17$1(SlickProjectionSpec.scala:955)
[info] at org.apache.pekko.projection.slick.SlickProjectionSpec.$init$$$anonfun$3$$anonfun$5(SlickProjectionSpec.scala:923)

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with SlickProjectionSpec.scala around lines 923-955 and the linked CI run, focusing on the grouped projection restart after offset 2. Reproduce the H2 NULL constraint failure and the missing Option at line 953. Done means the projection restarts from the previous offset without the handler exception and the test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
databases, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.