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
Fix sqlite busy errors with session based learning
There were a couple different errors
* We were still enqueing block ids and not sessions in some places
* When we call Enqueue we should filter out sessions that aren't
suitable for learning; this should minimize DB contention
* Improve logging
By default sqlite doesn't have any retries for SQLITE_BUSY errors. We
could configure a timeout for retries using a PRAGMA; we should probably
do that but I want to hold off to see if this PR fixes the contention.
* Filed #348 to follow up on this
Use ko to create docker images as part of the development process
* This is convenient when we want to build a docker image from our
latest changes without doing a relase.
* Change the Dockerfile to not include any arguments so that it is
compatible with the image ko builds
returnerrors.Wrapf(err, "Failed to update session")
128
152
}
129
-
returnerrors.Wrapf(err, "Failed to update session")
130
-
}
131
153
132
-
newRow, err:=protoToRow(session)
133
-
iferr!=nil {
134
-
iftxErr:=tx.Rollback(); txErr!=nil {
135
-
log.Error(txErr, "Failed to rollback transaction")
154
+
newRow, err:=protoToRow(session)
155
+
iferr!=nil {
156
+
returnerrors.Wrapf(err, "Failed to convert session proto to table row")
136
157
}
137
-
returnerrors.Wrapf(err, "Failed to convert session proto to table row")
138
-
}
139
158
140
-
ifnewRow.Contextid!=contextID {
141
-
iftxErr:=tx.Rollback(); txErr!=nil {
142
-
log.Error(txErr, "Failed to rollback transaction")
159
+
ifnewRow.Contextid!=contextID {
160
+
returnerrors.WithStack(errors.Errorf("contextID in session doesn't match contextID. Update was called with contextID: %v but session has contextID: %v", contextID, newRow.Contextid))
143
161
}
144
-
returnerrors.WithStack(errors.Errorf("contextID in session doesn't match contextID. Update was called with contextID: %v but session has contextID: %v", contextID, newRow.Contextid))
0 commit comments