@@ -64,7 +64,7 @@ def __init__(
64
64
65
65
self .repl_url = util .trailing_slash (repl_url )
66
66
self .http = Http (timeout_read_sec , timeout_write_sec , auth_path )
67
- self ._check_version ()
67
+ self ._report_version ()
68
68
self .index_url = urllib .parse .urljoin (self .repl_url , "replication/sql/index" )
69
69
70
70
def abort_all_transactions (self , database : str ) -> None :
@@ -102,20 +102,11 @@ def close_transaction(self, database: str, transaction_id: int, success: bool) -
102
102
for trans in responseJson ["databases" ][database ]["transactions" ]:
103
103
_LOG .debug ("Close transaction (id: %s state: %s)" , trans ["id" ], trans ["state" ])
104
104
105
- def _check_version (self ) -> None :
106
- """Check replication service version and exit if it is not
107
- the expected one
108
- """
105
+ def _report_version (self ) -> None :
106
+ """Get and report replication service version"""
109
107
url = urllib .parse .urljoin (self .repl_url , "meta/version" )
110
108
responseJson = self .http .get (url )
111
- if responseJson ["version" ] != version .REPL_SERVICE_VERSION :
112
- _LOG .critical (
113
- "Invalid replication server version (is %s, expected %s)" ,
114
- responseJson ["version" ],
115
- version .REPL_SERVICE_VERSION ,
116
- )
117
- sys .exit (1 )
118
- _LOG .info ("Replication service version: v%s" , version .REPL_SERVICE_VERSION )
109
+ _LOG .info ("Replication service version: %s, this application's version: %s" , responseJson ["version" ], version .REPL_SERVICE_VERSION )
119
110
120
111
def database_config (self , database : str , ingest_service_config : IngestServiceConfig ) -> None :
121
112
"""Set replication system configuration for a given database https://co
0 commit comments