Skip to content

Commit

Permalink
Merge pull request #937 from pg-sharding/hufedw
Browse files Browse the repository at this point in the history
Add Ignore_cancel param to router
  • Loading branch information
rkhapov authored Jan 14, 2025
2 parents 2849ac5 + 1b6bb77 commit 98bfe71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/config/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ type Router struct {

WithCoordinator bool `json:"with_coordinator" toml:"with_coordinator" yaml:"with_coordinator"`

IgnoreCancel bool `json:"ignore_cancel" toml:"ignore_cancel" yaml:"ignore_cancel"`

UseSystemdNotifier bool `json:"use_systemd_notifier" toml:"use_systemd_notifier" yaml:"use_systemd_notifier"`
SystemdNotifierDebug bool `json:"systemd_notifier_debug" toml:"systemd_notifier_debug" yaml:"systemd_notifier_debug"`
}
Expand Down
5 changes: 4 additions & 1 deletion router/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ func (cl *PsqlClient) Init(tlsconfig *tls.Config) error {

protoVer := binary.BigEndian.Uint32(msg)

spqrlog.Zero.Debug().
spqrlog.Zero.Info().
Uint("client", cl.ID()).
Uint32("proto-version", protoVer).
Msg("received protocol version")
Expand All @@ -706,6 +706,9 @@ func (cl *PsqlClient) Init(tlsconfig *tls.Config) error {
continue

case conn.SSLREQ:
if config.RouterConfig().IgnoreCancel {
return nil
}
if tlsconfig == nil {
_, err := cl.conn.Write([]byte{'N'})
if err != nil {
Expand Down

0 comments on commit 98bfe71

Please sign in to comment.