Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladimir Barsukov
zGo
Commits
6d4bbe0a
Commit
6d4bbe0a
authored
Nov 19, 2023
by
Vladimir Barsukov
Browse files
zgo_debug
parent
ffafeb48
Changes
3
Hide whitespace changes
Inline
Side-by-side
zdb/dev.go
View file @
6d4bbe0a
//go:build
dev
//go:build
zgo_debug
package
zdb
...
...
zdb/pool.go
View file @
6d4bbe0a
...
...
@@ -204,7 +204,10 @@ func (d *Pool) sync() *Conn {
}
if
d
.
Balance
==
BalanceRoundRobin
{
return
d
.
SrvSync
[
d
.
slavesIter
.
Add
(
1
)
%
int64
(
len
(
d
.
SrvSync
))]
conn
:=
d
.
SrvSync
[
d
.
slavesIter
.
Add
(
1
)
%
int64
(
len
(
d
.
SrvSync
))]
logConnStat
(
conn
)
return
conn
}
return
d
.
least
(
d
.
SrvSync
)
...
...
@@ -223,7 +226,10 @@ func (d *Pool) async() *Conn {
}
if
d
.
Balance
==
BalanceRoundRobin
{
return
d
.
SrvAsync
[
d
.
slavesAsyncIter
.
Add
(
1
)
%
int64
(
len
(
d
.
SrvAsync
))]
conn
:=
d
.
SrvAsync
[
d
.
slavesAsyncIter
.
Add
(
1
)
%
int64
(
len
(
d
.
SrvAsync
))]
logConnStat
(
conn
)
return
conn
}
return
d
.
least
(
d
.
SrvAsync
)
...
...
zdb/prod.go
View file @
6d4bbe0a
//go:build !
dev
//go:build !
zgo_debug
package
zdb
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment