We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你好:
DruidDataSource.java 的 1281 的 lock.lockInterruptibly() 行会产生 InterruptedException, 请不要在 catch (Throwable e) 里面忽略异常, 这样上层无法收到中断. 可以重新抛出异常或者重新设置中断状态. 抛出异常对客户来说比较有好, 可以和jdk库抛出的中断统一处理. 也请检查其他你们库中的其他地方是否忽略了中断. 谢谢.
关联代码为:
final long lastActiveTimeMillis = System.currentTimeMillis(); lock.lockInterruptibly(); // 这里产生的中断异常请重新抛出 try { activeCount--; closeCount++; putLast(holder, lastActiveTimeMillis); recycleCount++; } finally { lock.unlock(); } } catch (Throwable e) { holder.clearStatementCache(); if (!holder.isDiscard()) { this.discardConnection(physicalConnection); holder.setDiscard(true); } LOG.error("recyle error", e); recycleErrorCount.incrementAndGet(); }
The text was updated successfully, but these errors were encountered:
不吃掉也抛不出来啊
Sorry, something went wrong.
那就请重新设置中断状态(也可以异步抛出的). 直接忽略的话上层通过中断来通知业务停止处理时, 如果调用了druid的相关方法会导致业务层收不到中断通知.
一般在什么情况下这边会产生 InterruptedException,其他数据库没怎么遇到 最近用odbc连接azure,这边频繁中断
对待issues的态度是真差
No branches or pull requests
你好:
DruidDataSource.java 的 1281 的 lock.lockInterruptibly() 行会产生 InterruptedException, 请不要在 catch (Throwable e) 里面忽略异常, 这样上层无法收到中断. 可以重新抛出异常或者重新设置中断状态. 抛出异常对客户来说比较有好, 可以和jdk库抛出的中断统一处理. 也请检查其他你们库中的其他地方是否忽略了中断. 谢谢.
关联代码为:
The text was updated successfully, but these errors were encountered: