You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using cassandra as the write side and JPA as the read side, offsets will be time_uuid offsets rather than sequence offsets, so we will write null into the sequence_offset of the read side offsets table. However, when using postgres, the null value appears to be incorrectly converted, reporting a type conversion error for the sequence_offset column: Expected bigint, actual bytea:
In com.lightbend.lagom.internal.javadsl.persistence.jpa.JpaReadSideImpl.postgresqlBindUpdateOffsetQuery:
Statement:
update "read_side_offsets" set "sequence_offset"=?,"time_uuid_offset"=? where "read_side_id"=? and "tag"=?;
insert into "read_side_offsets" ("read_side_id","tag","sequence_offset","time_uuid_offset") select ?,?,?,? where not exists (select 1 from "read_side_offsets" where "read_side_id"=? and "tag"=?)
Since the sequence_offset will always be null when reading from cassandra, a workaround is to create the table with a sequence_offset column of type bytea:
When using cassandra as the write side and JPA as the read side, offsets will be time_uuid offsets rather than sequence offsets, so we will write
null
into thesequence_offset
of the read side offsets table. However, when using postgres, thenull
value appears to be incorrectly converted, reporting a type conversion error for thesequence_offset
column: Expected bigint, actual bytea:In
com.lightbend.lagom.internal.javadsl.persistence.jpa.JpaReadSideImpl.postgresqlBindUpdateOffsetQuery
:Statement:
Parameters:
Since the
sequence_offset
will always benull
when reading from cassandra, a workaround is to create the table with asequence_offset
column of typebytea
:This is possibly similar to #1772
The text was updated successfully, but these errors were encountered: