GeezerVison is showing github.com — Fix 32-bit ARM compatibility issue (#661) · neo4j/neo4j-go-driver@0b989f4
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: neo4j/internal/pool/pool.go +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -23,7 +23,6 @@ package pool | 23 | 23 | import ( | 24 | 24 | "container/list" | 25 | 25 | "context" | 26 | | - "github.com/neo4j/neo4j-go-driver/v5/neo4j/internal/homedb" | 27 | 26 | "math" | 28 | 27 | "sort" | 29 | 28 | "sync" | @@ -34,6 +33,7 @@ import ( | 34 | 33 | "github.com/neo4j/neo4j-go-driver/v5/neo4j/internal/bolt" | 35 | 34 | idb "github.com/neo4j/neo4j-go-driver/v5/neo4j/internal/db" | 36 | 35 | "github.com/neo4j/neo4j-go-driver/v5/neo4j/internal/errorutil" | | 36 | + "github.com/neo4j/neo4j-go-driver/v5/neo4j/internal/homedb" | 37 | 37 | itime "github.com/neo4j/neo4j-go-driver/v5/neo4j/internal/time" | 38 | 38 | "github.com/neo4j/neo4j-go-driver/v5/neo4j/log" | 39 | 39 | ) | @@ -66,7 +66,7 @@ type Pool struct { | 66 | 66 | log log.Logger | 67 | 67 | logId string | 68 | 68 | cache *homedb.Cache | 69 | | - ssrTracker ssrTracker | | 69 | + ssrTracker *ssrTracker | 70 | 70 | } | 71 | 71 |
| 72 | 72 | type serverPenalty struct { | @@ -87,7 +87,7 @@ func New(config *config.Config, connect Connect, logger log.Logger, logId string | 87 | 87 | logId: logId, | 88 | 88 | log: logger, | 89 | 89 | cache: cache, | 90 | | - ssrTracker: ssrTracker{}, | | 90 | + ssrTracker: &ssrTracker{}, | 91 | 91 | } | 92 | 92 | p.log.Infof(log.Pool, p.logId, "Created") | 93 | 93 | return p | |
Collapse file Copy file name to clipboardExpand all lines: neo4j/internal/pool/ssr_tracker.go +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -30,17 +30,17 @@ type ssrTracker struct { | 30 | 30 |
| 31 | 31 | func (s *ssrTracker) addConnection(c idb.Connection) { | 32 | 32 | if c.IsSsrEnabled() { | 33 | | - atomic.AddUint64(&s.ssrEnabledCount, ^uint64(0)) | | 33 | + atomic.AddUint64(&s.ssrEnabledCount, 1) | 34 | 34 | } else { | 35 | | - atomic.AddUint64(&s.ssrDisabledCount, ^uint64(0)) | | 35 | + atomic.AddUint64(&s.ssrDisabledCount, 1) | 36 | 36 | } | 37 | 37 | } | 38 | 38 |
| 39 | 39 | func (s *ssrTracker) removeConnection(c idb.Connection) { | 40 | 40 | if c.IsSsrEnabled() { | 41 | | - atomic.AddUint64(&s.ssrEnabledCount, 1) | | 41 | + atomic.AddUint64(&s.ssrEnabledCount, ^uint64(0)) | 42 | 42 | } else { | 43 | | - atomic.AddUint64(&s.ssrDisabledCount, 1) | | 43 | + atomic.AddUint64(&s.ssrDisabledCount, ^uint64(0)) | 44 | 44 | } | 45 | 45 | } | 46 | 46 |
| |
|