Hi all,
I'm currently testing concurrency for node-mysql using three different connection instances using:
async's mapSeries([
{value: 'hello', instance: connectionInstanceOne},
{value: 'world', instance: connectionInstanceTwo},
{value: 'hi', instance: connectionInstanceThree}
])
...to provide values to a function with only a very simple:
instanceConn.query() doing "REPLACE INTO ?? (`key` , value ) VALUES (?, ?) " (where instanceConn is connectionInstanceOne (for value 'hello'), connectionInstanceTwo (for value 'world'), or connectionInstanceThree (for value 'hi') from the object input in the map)
...inside the function; however, during the insertion phase (and the callback phase), it seems that the REPLACE INTO... statement is inserting in a different sequence from the 'hello', 'world', 'hi' order, and instead of having 'hi' as the last value inserted, the last value inserted switches between 'world' and 'hi' alternately every time I complete a test cycle.
Could anyone kindly explain how this out of sequence insertion is happening?
Thanks in advance!