File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -103,11 +103,17 @@ def supports_transactions(self):
103103 with self .connection .cursor ():
104104 client = self .connection .connection
105105 hello_response = client .admin .command ("hello" )
106+ server_status = client .admin .command ("serverStatus" )
106107 if "setName" in hello_response :
107108 is_replica_set = True
108- if "msg" in client . admin . command ( "hello" ) and hello_response ["msg" ] == "isdbgrid" :
109+ if "msg" in hello_response and hello_response ["msg" ] == "isdbgrid" :
109110 is_sharded_cluster = True
110- if is_replica_set or is_sharded_cluster :
111+ if (
112+ "storageEngine" in server_status
113+ and server_status ["storageEngine" ].get ("name" ) == "wiredTiger"
114+ ):
115+ is_wired_tiger = True
116+ if (is_replica_set or is_sharded_cluster ) and is_wired_tiger :
111117 return True
112118 return False
113119
You can’t perform that action at this time.
0 commit comments