Storing schema is rejected despite no changes being made since last fetch

Description

If I create and store a Synapse Table, then call the table.schema.addColumn method on the object returned by syn.store and attempt to store the newly updated schema, I see an exception that the schema has been updated since I last fetched it.

Here is code to reproduce the exception:

and here is the full exception:

Environment

python 3.6.7 and 3.7.3

Activity

Show:
Bruce Hoff
August 23, 2019, 10:52 PM

reports that she fixed a similar issue with FileEntity. The fix might apply here as well, we have to check.

Kimyen Truong
June 6, 2019, 12:05 AM

Ok, great! That indicates that syn.store() doesn’t return the object with the correct etag. I have seen this problem happened in other entity types, and has fixed File Entity specifically. To fix this problem for other entity type, it requires me to refactor syn.store() and make sure that it has deterministic behavior. I’m tagging this issue with syn.store label as working on syn.store would fix this problem.

Phil Snyder
June 5, 2019, 11:53 PM

Yes, refetching the schema with syn.get will avoid the exception.

 

Kimyen Truong
June 5, 2019, 11:48 PM

Btw, I really appreciate the detailed ticket with minimal reproducible example!

Kimyen Truong
June 5, 2019, 11:47 PM

, thank you so much for reporting this issue. I saw it in a more complicated setup and haven’t got a chance to dig into it yet. While you already have the minimal written test, may I ask you to try 1 more test for me? Can you replace:

with:

to see if the problem persist.
I’m trying to determine the priority of this ticket. If the code only fail in the your example, and not in the one I suggested, then there is a work around. Otherwise, I think addColumn then store is broken and this ticket would have a higher priority.

 

Assignee

Unassigned

Reporter

Phil Snyder

Labels

Validator

Phil Snyder

Development Area

None

Release Version History

None

Slack Channel

None

Affects versions

Priority

Major