Skip to content

tests.system.test_session_api: test_transaction_execute_update_then_insert_commit failed #485

@flaky-bot

Description

@flaky-bot

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 5629bac
buildURL: Build Status, Sponge
status: failed

Test output
args = (session: "projects/precise-truck-742/instances/google-cloud-1628673888891/databases/test_sessions_1628676428092/sessi...    string_value: "Phlyntstone"
      }
      values {
        string_value: "wylma@example.com"
      }
    }
  }
}
,)
kwargs = {'metadata': [('google-cloud-resource-prefix', 'projects/precise-truck-742/instances/google-cloud-1628673888891/databa...axZl0EgaLfm_VRoTVUUUzobMWu17ImOQFfnSBEQ'), ('x-goog-api-client', 'gl-python/3.8.6 grpc/1.39.0 gax/1.31.1 gccl/3.7.0')]}
@six.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
    try:
      return callable_(*args, **kwargs)

.nox/system-3-8/lib/python3.8/site-packages/google/api_core/grpc_helpers.py:67:


self = <grpc._channel._UnaryUnaryMultiCallable object at 0x7f581f1ebe50>
request = session: "projects/precise-truck-742/instances/google-cloud-1628673888891/databases/test_sessions_1628676428092/sessio... string_value: "Phlyntstone"
}
values {
string_value: "wylma@example.com"
}
}
}
}

timeout = None
metadata = [('google-cloud-resource-prefix', 'projects/precise-truck-742/instances/google-cloud-1628673888891/databases/test_sess...6axZl0EgaLfm_VRoTVUUUzobMWu17ImOQFfnSBEQ'), ('x-goog-api-client', 'gl-python/3.8.6 grpc/1.39.0 gax/1.31.1 gccl/3.7.0')]
credentials = None, wait_for_ready = None, compression = None

def __call__(self,
             request,
             timeout=None,
             metadata=None,
             credentials=None,
             wait_for_ready=None,
             compression=None):
    state, call, = self._blocking(request, timeout, metadata, credentials,
                                  wait_for_ready, compression)
  return _end_unary_response_blocking(state, call, False, None)

.nox/system-3-8/lib/python3.8/site-packages/grpc/_channel.py:946:


state = <grpc._channel._RPCState object at 0x7f581f2b4220>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7f581f287b40>
with_call = False, deadline = None

def _end_unary_response_blocking(state, call, with_call, deadline):
    if state.code is grpc.StatusCode.OK:
        if with_call:
            rendezvous = _MultiThreadedRendezvous(state, call, None, deadline)
            return state.response, rendezvous
        else:
            return state.response
    else:
      raise _InactiveRpcError(state)

E grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.ABORTED
E details = "Transaction aborted. Database schema probably changed during transaction, retry may succeed."
E debug_error_string = "{"created":"@1628676436.164783797","description":"Error received from peer ipv4:74.125.195.95:443","file":"src/core/lib/surface/call.cc","file_line":1069,"grpc_message":"Transaction aborted. Database schema probably changed during transaction, retry may succeed.","grpc_status":10}"
E >

.nox/system-3-8/lib/python3.8/site-packages/grpc/_channel.py:849: _InactiveRpcError

The above exception was the direct cause of the following exception:

sessions_database = <google.cloud.spanner_v1.database.Database object at 0x7f581f1f95e0>
sessions_to_delete = [<google.cloud.spanner_v1.session.Session object at 0x7f581f2b4640>]

@_helpers.retry_mabye_conflict
def test_transaction_execute_update_then_insert_commit(
    sessions_database, sessions_to_delete
):
    # [START spanner_test_dml_with_mutation]
    # [START spanner_test_dml_update]
    sd = _sample_data

    session = sessions_database.session()
    session.create()
    sessions_to_delete.append(session)

    with session.batch() as batch:
        batch.delete(sd.TABLE, sd.ALL)

    insert_statement = list(_generate_insert_statements())[0]

    with session.transaction() as transaction:
        rows = list(transaction.read(sd.TABLE, sd.COLUMNS, sd.ALL))
        assert rows == []

        row_count = transaction.execute_update(insert_statement)
        assert row_count == 1
      transaction.insert(sd.TABLE, sd.COLUMNS, sd.ROW_DATA[1:])

tests/system/test_session_api.py:654:


google/cloud/spanner_v1/transaction.py:375: in exit
self.commit()
google/cloud/spanner_v1/transaction.py:162: in commit
response = api.commit(request=request, metadata=metadata,)
google/cloud/spanner_v1/services/spanner/client.py:1323: in commit
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
.nox/system-3-8/lib/python3.8/site-packages/google/api_core/gapic_v1/method.py:145: in call
return wrapped_func(*args, **kwargs)
.nox/system-3-8/lib/python3.8/site-packages/google/api_core/retry.py:286: in retry_wrapped_func
return retry_target(
.nox/system-3-8/lib/python3.8/site-packages/google/api_core/retry.py:189: in retry_target
return target()
.nox/system-3-8/lib/python3.8/site-packages/google/api_core/grpc_helpers.py:69: in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)


value = None
from_value = <_InactiveRpcError of RPC that terminated with:
status = StatusCode.ABORTED
details = "Transaction aborted. Database...ge":"Transaction aborted. Database schema probably changed during transaction, retry may succeed.","grpc_status":10}"

???
E google.api_core.exceptions.Aborted: 409 Transaction aborted. Database schema probably changed during transaction, retry may succeed.

:3: Aborted

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/python-spanner API.flakybot: flakyTells the Flaky Bot not to close or comment on this issue.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.type: processA process-related concern. May include testing, release, or the like.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions