Oracle lag between commit and select

前端 未结 8 1947
攒了一身酷
攒了一身酷 2020-12-29 12:00

We have an Java workflow application that uses an Oracle database to track its steps and interactions with other services. During a workflow run several insert/update/selec

8条回答
  •  温柔的废话
    2020-12-29 12:19

    If the DBA team tried to modify the max_commit_propagation_delay parameter, it probably means you are connecting to a RAC instance (i-e: several distinct servers accessing one single database).

    In that case, when you're closing and reopening the connection in your java code there is a chance that you will be answered by a different server. The delay parameter means that there is a small time frame when the two instances won't be at exactly the same point in time. The answer you are getting is consistent with a point in time but may not be the most current.

    As proposed by KM, the easiest solution would be to keep the connection opened after the commit.

    Alternatively, you could also add a delay after having closed the connection if it is practical (if this is a batch job and response time is not critical for example).

提交回复
热议问题