loic-sharma / BaGet

A lightweight NuGet and symbol server
https://loic-sharma.github.io/BaGet/
MIT License
2.58k stars 644 forks source link

Concurrency conflicts for download counter not detected using SQLite #724

Open appel1 opened 2 years ago

appel1 commented 2 years ago

Was looking at #716 and couldn't reproduce the issue using an SQLite db. I'm not sure, but I think the EF SQLite implementation does not update the specified rowVersion column automatically. You have to add a trigger that updates it yourself in a migration.

To reproduce download a package and check the RowVersion column in the db. It is still the default value, null.

Simulating a concurrency conflict does not trigger a DbUpdateConcurrencyException either.