1
0
Fork 0

Add missing parenthesis

master
Philip O'Toole 1 year ago committed by GitHub
parent c8c8617e3f
commit 6ab6faaca0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1437,7 +1437,7 @@ func (s *Service) handleQuery(w http.ResponseWriter, r *http.Request) {
http.Error(w, err.Error(), http.StatusBadRequest) http.Error(w, err.Error(), http.StatusBadRequest)
return return
} }
stats.Add(numQueryStmtsRx, int64(len(queries)) stats.Add(numQueryStmtsRx, int64(len(queries)))
// No point rewriting queries if they don't go through the Raft log, since they // No point rewriting queries if they don't go through the Raft log, since they
// will never be replayed from the log anyway. // will never be replayed from the log anyway.
@ -1539,7 +1539,7 @@ func (s *Service) handleRequest(w http.ResponseWriter, r *http.Request) {
http.Error(w, err.Error(), http.StatusBadRequest) http.Error(w, err.Error(), http.StatusBadRequest)
return return
} }
stats.Add(numRequestStmtsRx, int64(len(stmts)) stats.Add(numRequestStmtsRx, int64(len(stmts)))
if err := command.Rewrite(stmts, noRewriteRandom); err != nil { if err := command.Rewrite(stmts, noRewriteRandom); err != nil {
http.Error(w, fmt.Sprintf("SQL rewrite: %s", err.Error()), http.StatusInternalServerError) http.Error(w, fmt.Sprintf("SQL rewrite: %s", err.Error()), http.StatusInternalServerError)

Loading…
Cancel
Save