Skip to content

Commit 38b4750

Browse files
authored
Drop unused function (#736)
1 parent 6d26b2e commit 38b4750

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

router/relay/relay.go

-31
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ type RelayStateMgr interface {
6565
ProcessMessageBuf(waitForResp, replyCl, completeRelay bool, cmngr poolmgr.PoolMgr) (bool, error)
6666
RelayRunCommand(msg pgproto3.FrontendMessage, waitForResp bool, replyCl bool) error
6767

68-
Sync(waitForResp, replyCl bool, cmngr poolmgr.PoolMgr) error
69-
7068
ProcQuery(query pgproto3.FrontendMessage, waitForResp bool, replyCl bool) (txstatus.TXStatus, []pgproto3.BackendMessage, bool, error)
7169
ProcCopy(query pgproto3.FrontendMessage) error
7270

@@ -1579,35 +1577,6 @@ func (rst *RelayStateImpl) ProcessMessageBuf(waitForResp, replyCl, completeRelay
15791577
}
15801578
}
15811579

1582-
// TODO : unit tests
1583-
func (rst *RelayStateImpl) Sync(waitForResp, replyCl bool, cmngr poolmgr.PoolMgr) error {
1584-
spqrlog.Zero.Debug().
1585-
Uint("client", rst.Client().ID()).
1586-
Msg("client relay exeсuting sync for client")
1587-
1588-
// if we have no active connections, we have noting to sync
1589-
if !cmngr.ConnectionActive(rst) {
1590-
return rst.Client().ReplyRFQ(rst.TxStatus())
1591-
}
1592-
if err := rst.PrepareRelayStep(cmngr); err != nil {
1593-
return err
1594-
}
1595-
1596-
if _, _, err := rst.RelayFlush(waitForResp, replyCl); err != nil {
1597-
/* Relay flush completes relay */
1598-
return err
1599-
}
1600-
1601-
if err := rst.CompleteRelay(replyCl); err != nil {
1602-
return err
1603-
}
1604-
1605-
if _, _, err := rst.RelayStep(&pgproto3.Sync{}, waitForResp, replyCl); err != nil {
1606-
return err
1607-
}
1608-
return nil
1609-
}
1610-
16111580
// TODO : unit tests
16121581
func (rst *RelayStateImpl) ProcessMessage(
16131582
msg pgproto3.FrontendMessage,

0 commit comments

Comments
 (0)