vendredi 9 décembre 2016

How could I generate the unique and random string and insert it into the database using several thread concurrently?

I want to generate a huge number of coupon codes and store them with mysql. The problem is that I couldn't guarantee there are different random strings generate by two Java thread at the same time。And there 's no unique index to use. Forgive my poor English. Thanks!




Aucun commentaire:

Enregistrer un commentaire