Open Voileexperiments opened 6 years ago
Related: #1009
This is happening again:
https://www.codewars.com/kata/scytale-encoder-slash-decoder-ancient-spartans-cipher
There are 2 JS language versions. Incidentally, it also causes JS version edits to fail to be applied.
Two C versions: https://www.codewars.com/kata/square-matrix-multiplication
Is this related to #1683?
Not related to #1683, but the same idea. Bugs from race conditions like this unavoidable unless the data integrity is enforced at the database level.
This one is embedded document so unique index (within the document embedded in) is not even supported. So I'm not really sure what to do.
MongoDB is obviously not great for relational data and it's very difficult (or just needs more work) to maintain data integrity. I wish Codewars used PostgreSQL, but it is what it is.
If kata data is structured like what I can see from the editor publish requests I think you can do this, just need to add an extra key to all the available languages as strings per kata.
@Voileexperiments thanks, yeah, something like that should minimize the risk.
Languages are embedded in kata and it has "name"
key.
{
name: "Multiply",
languages: [
{
name: "javascript"
}
]
}
The ORM should be validating the uniqueness of languages.name
locally (so adding another javascript
to above will fail), but that's the best they can do.
When a translation is approved we currently do the following to merge a language (after checking description conflict etc).
Two Java versions: https://www.codewars.com/kata/path-finder-number-4-where-are-you
Same thing hapenes to this Kata:
If we're supposed to post them here, there's a bunch:
I see them all the time. Quite a bug!
Hmmm..... found some more O_o:
seems it happened again there with JS : https://www.codewars.com/kata/5f55ecd770692e001484af7d
Two C++ translations on this kata: https://www.codewars.com/kata/5cb7baa989b1c50014a53333/discuss#64a83efddddc25116edfd0bd
Two Crystal translations: https://www.codewars.com/kata/5d49c93d089c6e000ff8428c/crystal
Two CoffeeScript translations: https://www.codewars.com/kata/5b180e9fedaa564a7000009a
This has occurred to this translation of this kata:
Translation approvals does not seem to handle race conditions properly. If two separate users approve the same translation at once, it'll end up being approved twice and now we have 2 versions of the same language.
┆Issue is synchronized with this Clickup by Unito