@@ -65,8 +65,6 @@ type RelayStateMgr interface {
65
65
ProcessMessageBuf (waitForResp , replyCl , completeRelay bool , cmngr poolmgr.PoolMgr ) (bool , error )
66
66
RelayRunCommand (msg pgproto3.FrontendMessage , waitForResp bool , replyCl bool ) error
67
67
68
- Sync (waitForResp , replyCl bool , cmngr poolmgr.PoolMgr ) error
69
-
70
68
ProcQuery (query pgproto3.FrontendMessage , waitForResp bool , replyCl bool ) (txstatus.TXStatus , []pgproto3.BackendMessage , bool , error )
71
69
ProcCopy (query pgproto3.FrontendMessage ) error
72
70
@@ -1579,35 +1577,6 @@ func (rst *RelayStateImpl) ProcessMessageBuf(waitForResp, replyCl, completeRelay
1579
1577
}
1580
1578
}
1581
1579
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
-
1611
1580
// TODO : unit tests
1612
1581
func (rst * RelayStateImpl ) ProcessMessage (
1613
1582
msg pgproto3.FrontendMessage ,
0 commit comments