You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an import script that runs 3 concurrent instances, each perform a BulkImportOrUpdateAsync call with the UpdateByProperties value set to my unique Key of my object.
However; when running this routine, I will occassionally get errors in regards to a Duplicate Key Name on the Temp Key it tries to create using the UpdateByProperties field. (This field does have a Unique Key already set)
Is there some property I can set so that the Temp Keys created to have a random identifier like the Temp Tables. Or could this be implemented if not?
I am using MySQL, I did transition over to SQLServer briefly and didn't experiance this issue which I think is because of what you mentioned here. But decided in the end to revert back
Thinking about it, is this intended? I already have a Unique Key set against my Puuid column. Is there a reason why it needs to setup a Temp Key against that column again for the same table.
I am wondering if my configuration is perhaps wrong?
I have defined it as a Unique Index within my model builder. Is there anything else I can do so that it uses this Key rather than trying to create a new one.
From my understanding the issues are likely one or more of the following:
My Unique Key on my Puuid Column is not being picked up. Resulting in the code attempting to create a temporary Unique Key against the table that already has a Unique Key. Possible configuration issue on my side in the Table, C# Object, or EF Core Model Builder. What are your suggestions to handle this?
The "GetUniqueConstrainName" function within "MySqlQueryBuilder" only creates a Key Name that is Unique Outside of Concurrency. In my case because I have 3 different instances interacting with my Summoners Table. All of them are generating the same "Unique" Constrain Name. If this was actually Unique with some randomness inserted this would likely solve the issue.
Curiously, if I want to run my code concurrently, what are the best practices you suggest?
I have an import script that runs 3 concurrent instances, each perform a BulkImportOrUpdateAsync call with the UpdateByProperties value set to my unique Key of my object.
However; when running this routine, I will occassionally get errors in regards to a Duplicate Key Name on the Temp Key it tries to create using the UpdateByProperties field. (This field does have a Unique Key already set)
Is there some property I can set so that the Temp Keys created to have a random identifier like the Temp Tables. Or could this be implemented if not?
The text was updated successfully, but these errors were encountered: