It seems that a tls endpoint can pump more data records even when it has received a re-handshake request from peer.
Also in dtls, new data records would get accepted even while rehandshake is in progress since any of the endpoint does not have way to tell whether those records originated after a handshake message. This is because re-transmission of handshake message gets a new record protocol header sequence number. So looking at record protocol header sequence number is not a good way to tell the ordering of events.
Do the endpoints have any way to tell which data they received before re-handshake completed and which one they received after rehandshake?