SQL Error: 1205, SQLState: 40001 2023-02-06 11:57:33.526 ERROR 3028 --- [o-8080-exec-431] o.h.engine.jdbc.spi.SqlExceptionHelper : Transaction (Process ID 61) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction. 2023-02-06 11:57:33.527 ERROR 3028 --- [o-8080-exec-431] h.hsas.service.Exception Controller : ErrorResponse(location=[CannotAcquireLockException]
격리수준 • @Retryable • 쿼리 튜닝 @Lock(LockModeType.PESSIMISTIC_WRITE) @Query("select u from User u where u.id = :id") Optional<User> findUserForUpdate(@Param("id") Long id); @Transactional(isolation = Isolation.READ_COMMITTED) public void updateUserWithIsolation(Long userId, String newEmail) { User user = userRepository.findUserForUpdate(userId).orElse(null); if (user != null) { user.setEmail(newEmail); userRepository.save(user); } }
격리수준 • @Retryable • 쿼리 튜닝 SELECT o.order_id, o.order_date, c.customer_name, p.product_name, od.quantity, od.unit_price FROM orders o JOIN customers c ON o.customer_id = c.customer_id JOIN order_details od ON o.order_id = od.order_id JOIN products p ON od.product_id = p.product_id WHERE o.order_date BETWEEN '2022-01-01' AND '2022-12-31' AND c.country = 'USA' AND p.category = 'Electronics' ORDER BY o.order_date DESC;
강화 Stream 도입 GEO 데이터 타입 지원 모듈 시스템 도입 2010 가상 메모리 사용 새로운 데이터타입 추가 (Set, Sorted Set, BitMap, HyperLogLog 등) 클러스터터링 기본 구조 7.x 2.x 3.x 4.x 5.x 6.x 2017 RDB 스냅샷 지속성 업데이트 메모리 관리, 프로토콜 성능 향상 CLI 도입 RESP3 프로토콜 도입 2022 Client Side Caching Redis Functions ACLv2 명령 검사 및 Sharded Pub/Sub 2019 Bitfield 타입 추가 멀티 스레드 기능 추가 클러스터링 관련 기능과 안정성 개선 모듈 시스템 관련 기능과 안정성 개선 2020 Memory Persistence 개선 RDB 스냅샷과 AOF 로그 혼합 방식의 지속성 구현 레디스 랩(Redis Raft) 프로젝트 공개로 분산 로깅을 위한 기능 제공 ACL
Cluster In-Memory Data Collections Persistence 모니터링 Sentinel Replication TTL Cache 분산 시스템 RSS Jemalloc Redis 분산 락 Redis Queue 메시지 큐 / 작업 큐 ACL Lua Scripting
people = Thread.currentThread().getName(); long now = System.currentTimeMillis(); redisTemplate.opsForZSet().add(apply.getEventUuid(), people, (int) now); } public void publish(String event){ final long start = FIRST; final long end = SIZE - LAST; Set<Object> queue = redisTemplate.opsForZSet().range(event, start, end); for (Object people : queue) { if(applyRepository.count()==100) Break; Apply entity = new Apply(); entity.setEventUuid(event); entity.setUserUuid((String)str); applyRepository.save(entity); redisTemplate.opsForZSet().remove(event, people); } }
Returns Spin lock instance by name. * <p> * Implements a <b>non-fair</b> locking so doesn't guarantees an acquire order by threads. * <p> * Lock doesn't use a pub/sub mechanism * * @param name - name of object * @return Lock object */ RLock getSpinLock(String name);
refused: connect at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClien tConnectionOperator.java:156) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$JMeterDefaultHttpClientConnectionO perator.connect(HTTPHC4Impl.java:409) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClient ConnectionManager.java:376) at org.redisson.client.RedisTimeoutException: Command execution timeout for command: (PING), params: [], Redis client: [addr=redis://localhost:6379] at org.redisson.client.RedisConnection.lambda$async$0(RedisConnection.java:244) ~[redisson-3.18.0.jar:3.18.0] at io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715) ~[netty-common-4.1.94.Final.jar:4.1.94.Final] at io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34) ~[netty-common-4.1.94.Final.jar:4.1.94.Final]