To add to the above remark:
If you use HADR Nearsynch mode, then the transaction will be considered as committed (assuming a commit is issued or auto-commit) on the primary when the log record is transferred to the HADR log buffer on the standby.
If using HADR Synch mode, the transaction will be considered as committed (assuming a commit is issued or auto-commit) on the primary only when the log record is written from the HADR buffer on the standby to the log file on disk on the standby.