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
While working on another aspect I was getting an error "aggregate functions are not allowed in WHERE" which was then followed (after a roll back to the start of the epoch) by:
DbInsertException "PoolOfflineFetchError"
( SqlError
{ sqlState = "23503"
, sqlExecStatus = FatalError
, sqlErrorMsg = "insert or update on table \"pool_offline_fetch_error\" violates foreign key \
\constraint \"pool_offline_fetch_error_pmr_id_fkey\""
, sqlErrorDetail = "Key (pmr_id)=(1312) is not present in table \"pool_metadata_ref\"."
, sqlErrorHint = ""
}
)
I have checked that commit d658f38 is present in the branch I am working on.
The text was updated successfully, but these errors were encountered:
😢 Turns out the insertOfflineResults function had:
insert :: (MonadBaseControl IO m, MonadIO m) => FetchResult -> ReaderT SqlBackend m ()
insert fr =
case fr of
ResultMetadata md -> void $ DB.insertPoolOfflineData md
ResultError fe -> void $ DB.insertPoolOfflineFetchError fe
Probably as the result of a bad git merge.
That should have been using DB.insertCheckPoolOfflineData and DB.insertCheckPoolOfflineFetchError.
To reiterate:
The test for this was correctly using the checked versions of these functions
The actual real code was using the old unckecked versions of these functions
The solution is to permanently remove the unchecked versions of those functions
This affects both master and the latest 11.0.3 release 😢
erikd
changed the title
Still getting mssing foreign key exception of pool metadata tables
Still getting missing foreign key exception of pool metadata tables
Sep 29, 2021
This was supposed to be fixed in d658f38 but probably due to a git
merge error, the new functions that were supposed to fix this issue were
added but not used.
The fix is to use the checked versions of the functions and completely
remove the unchecked functions so they cannot be called by accident.
Closes: #858
While working on another aspect I was getting an error
"aggregate functions are not allowed in WHERE"
which was then followed (after a roll back to the start of the epoch) by:I have checked that commit d658f38 is present in the branch I am working on.
The text was updated successfully, but these errors were encountered: