mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
Introduce transaction isolation customization
Search related indexing transactions requires better TX begin/commit. New helpers provide TX isolation control.
This commit is contained in:
parent
36d7136210
commit
f062005946
5 changed files with 63 additions and 65 deletions
|
@ -696,7 +696,7 @@ func (h *Handler) Delete(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
// Delete the space first.
|
||||
ok := true
|
||||
ctx.Transaction, ok = h.Runtime.StartTx()
|
||||
ctx.Transaction, ok = h.Runtime.StartTx(sql.LevelReadUncommitted)
|
||||
if !ok {
|
||||
response.WriteError(w, method)
|
||||
return
|
||||
|
@ -712,7 +712,7 @@ func (h *Handler) Delete(w http.ResponseWriter, r *http.Request) {
|
|||
h.Runtime.Commit(ctx.Transaction)
|
||||
|
||||
// Delete data associated with this space.
|
||||
ctx.Transaction, ok = h.Runtime.StartTx()
|
||||
ctx.Transaction, ok = h.Runtime.StartTx(sql.LevelReadUncommitted)
|
||||
if !ok {
|
||||
response.WriteError(w, method)
|
||||
return
|
||||
|
@ -756,7 +756,7 @@ func (h *Handler) Delete(w http.ResponseWriter, r *http.Request) {
|
|||
h.Runtime.Commit(ctx.Transaction)
|
||||
|
||||
// Record this action.
|
||||
ctx.Transaction, ok = h.Runtime.StartTx()
|
||||
ctx.Transaction, ok = h.Runtime.StartTx(sql.LevelReadUncommitted)
|
||||
if !ok {
|
||||
response.WriteError(w, method)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue