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
Most of the time its the correct value however I'm getting a ton of off by 1 values
When doing something like AggregateID:= stmt.GetInt64("agg_id"). These values all well within 64 bits so not sure what the issue could be. Any thoughts on what I could be doing wrong?
If I call it explicitly via
stmt2:=db.Prep("select * from events where agg_id=132345566607552512;")
for {
has, err:=stmt2.Step()
iferr!=nil {
log.Fatal(err)
}
if!has {
break
}
log.Print(stmt2.GetInt64("agg_id"), stmt2.GetInt64("version"))
}
EDIT: also oddly I'm getting off by one the other direction as well. 132361724597481473 in sqlite but coming through as 132361724597481472
EDIT2: So I changed ALL ids from int64 to string. Exact same issue! So I narrowed it down.
Have 2 goroutines (A,B) with completely different pools and databases (A.sqlite & B.sqlite)
Get errors
Comment out either pool
Works as expected.
Enable both and delete previous databases
Get errors
A.sqlite contains what I'd expect the contents of B.sqlite to be, B.sqlite is empty!
So is having multiple pools of separate not supported in the same process?
The text was updated successfully, but these errors were encountered:
delaneyj
changed the title
GetInt64() giving off by 1 values
Multiple sqlitex.Pools giving off by 1 values
Jan 1, 2021
Using sonyflake IDs and getting odd behavior
Most of the time its the correct value however I'm getting a ton of off by 1 values
When doing something like
AggregateID:= stmt.GetInt64("agg_id")
. These values all well within 64 bits so not sure what the issue could be. Any thoughts on what I could be doing wrong?If I call it explicitly via
EDIT: also oddly I'm getting off by one the other direction as well. 132361724597481473 in sqlite but coming through as 132361724597481472
EDIT2: So I changed ALL ids from int64 to string. Exact same issue! So I narrowed it down.
So is having multiple pools of separate not supported in the same process?
The text was updated successfully, but these errors were encountered: