Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pymongo/asynchronous/client_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@
WTimeoutError,
)
from pymongo.helpers_shared import _RETRYABLE_ERROR_CODES
from pymongo.operations import _Op
from pymongo.read_concern import ReadConcern
from pymongo.read_preferences import ReadPreference, _ServerMode
from pymongo.server_type import SERVER_TYPE
Expand Down Expand Up @@ -868,7 +867,7 @@ async def func(
return await self._finish_transaction(conn, command_name)

return await self._client._retry_internal(
func, self, None, retryable=True, operation=_Op.ABORT
func, self, None, retryable=True, operation=command_name
)

async def _finish_transaction(self, conn: AsyncConnection, command_name: str) -> dict[str, Any]:
Expand Down
5 changes: 3 additions & 2 deletions pymongo/synchronous/client_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@
WTimeoutError,
)
from pymongo.helpers_shared import _RETRYABLE_ERROR_CODES
from pymongo.operations import _Op
from pymongo.read_concern import ReadConcern
from pymongo.read_preferences import ReadPreference, _ServerMode
from pymongo.server_type import SERVER_TYPE
Expand Down Expand Up @@ -864,7 +863,9 @@ def func(
) -> dict[str, Any]:
return self._finish_transaction(conn, command_name)

return self._client._retry_internal(func, self, None, retryable=True, operation=_Op.ABORT)
return self._client._retry_internal(
func, self, None, retryable=True, operation=command_name
)

def _finish_transaction(self, conn: Connection, command_name: str) -> dict[str, Any]:
self._transaction.attempt += 1
Expand Down
Loading