1
응용 프로그램의 jdbc 인바운드 채널 어댑터 및 메시지 저장소는 일관되게 데이터 쿼리를 중지하고 차단 된 Oracle 세션까지 추적 할 수있었습니다. 오라클에서는 enq : TX - row 잠금 경합이 발생합니다. DBA는이를 다음과 같이 추적했습니다 :스프링 통합 - Oracle 잠금 경합
SELECT COMPLETE, LAST_RELEASED_SEQUENCE, CREATED_DATE, UPDATED_DATE
from INT_MESSAGE_GROUP
where GROUP_KEY = :1 and REGION=:2
이 문제를 해결하는 방법에 대한 제안은 크게 감사하겠습니다.
SI 구성 (추출물) :
<int-jdbc:message-store id="jdbc-messageStore" data-source="dataSource" />
<int-jdbc:inbound-channel-adapter id="JDBCInboundChannel" query="${cache.integration.jdbc.selectQuery}"
channel="inboundMessagesChannel" data-source="dataSource" update="update CACHE_REPOSITORY set STATUS='P' WHERE GUID IN (:guid)" row-mapper="rowMapper"
max-rows-per-poll="${cache.integration.jdbc.maxRowsPerPoll}" auto-startup="false" >
<int:poller id="jdbcPoller" fixed-delay="${cache.integration.jdbc.fixedDelay}" >
<int:transactional />
</int:poller>
</int-jdbc:inbound-channel-adapter>
<int:chain...>
<int:aggregator id="reportTypeAggregator" ref="aggregatorBean" method="collect"
message-store="jdbc-messageStore" release-strategy="releaseStrategry"
release-strategy-method="canRelease" correlation-strategy="reportTypeCorrelationStrategry"
correlation-strategy-method="correlate" send-partial-result-on-expiry="true"
expire-groups-upon-completion="true" empty-group-min-timeout="30000" />
</int:chain>
<bean id="queryProvider" class="org.springframework.integration.jdbc.store.channel.OracleChannelMessageStoreQueryProvider"/>
<bean id="jdbc-channel-messageStore" class="org.springframework.integration.jdbc.store.JdbcChannelMessageStore">
<property name="dataSource" ref="dataSource"/>
<property name="channelMessageStoreQueryProvider" ref="queryProvider"/>
<property name="region" value="${cache.integration.channelMessageStore.region}"/>
</bean>
<int:channel id="archiveCreationChannel" >
<int:queue message-store="jdbc-channel-messageStore" />
<int:interceptors>
<int:wire-tap channel="logger" timeout="-1"/>
</int:interceptors>
</int:channel>
<bean id="documentMessageStoreReaper" class="org.springframework.integration.store.MessageGroupStoreReaper">
<property name="messageGroupStore" ref="jdbc-messageStore" />
<property name="timeout" value="${cache.integration.reaper.timeout}" />
<property name="autoStartup" value="false" />
</bean>
<task:scheduled-tasks>
<task:scheduled ref="documentMessageStoreReaper" method="run" fixed-rate="10000" />
</task:scheduled-tasks>
표시 한 선택으로 인해이 대기 이벤트가 발생할 수 없습니다. 행 잠금 경합은 두 개의 세션이 동일한 행을 업데이트하거나 같은 행에 대해 '선택 ... FOR UPDATE'를 수행 할 때 발생합니다. 그러나 일반 '선택'은이 문제를 일으키지 않습니다. –
그건 자물쇠와 관련된 것으로 내 DBA가 제공 한 쿼리입니다. 다른 테이블에 동일한 테이블에 대해 매우 긴 쿼리가 있습니다. \t INT_MESSAGE_GROUP에서 DELETE GROUP_KEY = 1 및 REGION = : 2 – user3802300
경합이 일어나는 순간에도이 항목을 확인할 수 있습니다 .. https://www.crealoq.com/solved/Identify-Blocking-Session- 차단 된 세션 차단 및 Statement-and-Locked-Objects-in-Oracle-DB – clq