Reading from a OPC UA device, synchronization issues

I’ve got a Siemmens PLC connected via OPC UA.
I want to read a list of records that are stored in a buffer in the device; each record is made available through a collection of tags.
There is need of a way for the PLC to inform the client that a new record is available and for the client to notify the PLC that the data has been read and it can go on with the next.
We came up with the following solution, based on a DataAvailable bit that is set by the PLC when data are available and reset to 0 in an Ignition Script when data has been consumed.

dataAvailable ="[default]FieldData/dataAvailable").value

if dataAvailable:

    whatever ="[default]FieldData/Whatever1").value

    #do whatever with the data

    system.tag.write("[default]FieldData/dataAvailable", False)

This code seems to be susceptible to both repeated reads (the same data gets read twice, even three times) and data loss.
Obviously this simple ‘handshaking’ has to be implemented correctly on the PLC side.
PLC people say that the implementation is correct on their side, and that there is some sort of problem that is related with the communication delay.
My questions are:

  1. is this schema too simplistic? Should I use a more comples (two-bits) handshake mechanism?
  2. is OPC communication protocol connection-based or broadcast-based, that is: when changing a tag’s value, should i relay that tag modification on the other side happens in the same order they are done on the originating side?

I replaced
system.tag.write("[default]FieldData/dataAvailable", False)
system.tag.writeSynchronous("[default]FieldData/dataAvailable", False)

Without success.

You should definitely use two tags for the handshaking whenever possible. Race conditions are possible when one tag is written from both sides.

One approach is described here:

Great, thank you Kevin. If I wanted to study this topic in more depth, can you provide some relevant links where I can find examples or theory about race conditions in the context of network comunication like this? But close to the PLC field, not generic?