Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
1 year ago
by
Vladimir Barsukov
Browse files
Options
Download
Email Patches
Plain Diff
zgo_debug
parent
ffafeb48
master
v1.6.4
v1.6.3
v1.6.2
v1.6.1
v1.6.0
v1.5.4
v1.5.3
v1.5.2
v1.5.1
v1.5.0
v1.4.8
v1.4.7
v1.4.6
v1.4.5
v1.4.4
v1.4.3
v1.4.2
v1.4.1
v1.4.0
v1.3.1
v1.3.0
v1.2.1
v1.2.0
v1.1.1
v1.1.0
v1.0.9
v1.0.8
v1.0.7
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
zdb/dev.go
+1
-1
zdb/dev.go
zdb/pool.go
+8
-2
zdb/pool.go
zdb/prod.go
+1
-1
zdb/prod.go
with
10 additions
and
4 deletions
+10
-4
zdb/dev.go
+
1
-
1
View file @
6d4bbe0a
//go:build
dev
//go:build
zgo_debug
package
zdb
...
...
This diff is collapsed.
Click to expand it.
zdb/pool.go
+
8
-
2
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
)
...
...
This diff is collapsed.
Click to expand it.
zdb/prod.go
+
1
-
1
View file @
6d4bbe0a
//go:build !
dev
//go:build !
zgo_debug
package
zdb
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets