GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Cloud Spanner client incorrectly handles NOT_FOUND error returned by create database · Issue #4071 · googleapis/google-cloud-python Closed Labels api: spannerIssues related to the Spanner API.priority: p2Moderately-important priority. Fix may not be included in next release. DescriptionWhile creating a database, is the backend returns NOT_FOUND error, the client assumes it to indicate that instance is not found and thus returns "Instance not found" error message: This is not always the case as cloud spanner can return NOT_FOUND in other scenarios. For eg in the "CREATE INDEX ... " ddl statement that table that the index is being created on does not exist it would return a NOT_FOUND. I think the fix would be to just pass the error message returned by the rpc to the user. This can be reproduced using: from google.cloud import spanner """Creates a database and tables for pattern 1 sample data.""" spanner_client = spanner.Client() instance = spanner_client.instance("test-instance") database = instance.database("bitemporal_pattern1", ddl_statements=[ """CREATE TABLE MyTable ( Id String(36) NOT NULL, Field1 STRING(36) NOT NULL ) PRIMARY KEY (Id)""" , """CREATE INDEX IDX ON yTable (Field1)""" ]) operation = database.create() print('Waiting for operation to complete...') operation.result() Activity
MetadataMetadataAssigneesLabelsapi: spannerIssues related to the Spanner API.priority: p2Moderately-important priority. Fix may not be included in next release. TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |