Skip to content
New issue

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

UndoLog.size()" because "t.undoLog" is null #196

Closed
cbqqkcel opened this issue Aug 6, 2023 · 2 comments
Closed

UndoLog.size()" because "t.undoLog" is null #196

cbqqkcel opened this issue Aug 6, 2023 · 2 comments

Comments

@cbqqkcel
Copy link

cbqqkcel commented Aug 6, 2023

2023-08-06T14:31:53.993+08:00 ERROR 21484 --- [nio-8100-exec-4] c.c.i.c.advice.GlobalResponseHandler : Throwable

java.lang.NullPointerException: Cannot invoke "org.lealone.transaction.aote.log.UndoLog.size()" because "t.undoLog" is null
at org.lealone.transaction.aote.AOTransactionMap.size(AOTransactionMap.java:243) ~[lealone-aote-5.1.2.jar:na]
at org.lealone.db.index.standard.StandardPrimaryIndex.getRowCount(StandardPrimaryIndex.java:343) ~[lealone-db-5.1.2.jar:na]
at org.lealone.db.table.StandardTable.getRowCount(StandardTable.java:482) ~[lealone-db-5.1.2.jar:na]
at org.lealone.sql.expression.aggregate.BuiltInAggregate.getValue(BuiltInAggregate.java:138) ~[lealone-sql-5.1.2.jar:na]
at org.lealone.sql.expression.Alias.getValue(Alias.java:35) ~[lealone-sql-5.1.2.jar:na]
at org.lealone.sql.query.QOperator.createRow(QOperator.java:136) ~[lealone-sql-5.1.2.jar:na]
at org.lealone.sql.query.QAggregateQuick.run(QAggregateQuick.java:24) ~[lealone-sql-5.1.2.jar:na]
at org.lealone.sql.query.YieldableSelect.executeInternal(YieldableSelect.java:92) ~[lealone-sql-5.1.2.jar:na]
at org.lealone.sql.executor.YieldableBase.run(YieldableBase.java:97) ~[lealone-sql-5.1.2.jar:na]
at org.lealone.sql.StatementBase.syncExecute(StatementBase.java:509) ~[lealone-sql-5.1.2.jar:na]
at org.lealone.sql.StatementBase.executeQuery(StatementBase.java:542) ~[lealone-sql-5.1.2.jar:na]
at org.lealone.client.jdbc.JdbcStatement.executeQuerySQLCommand(JdbcStatement.java:376) ~[lealone-client-5.1.2.jar:na]
at org.lealone.client.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:306) ~[lealone-client-5.1.2.jar:na]
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:65) ~[mybatis-3.5.13.jar:3.5.13]

在查询中突然报了一个这样的错。无法重现。

@cbqqkcel
Copy link
Author

cbqqkcel commented Aug 6, 2023

升级到最新版依然会有这个问题

@codefollower
Copy link
Member

这是个并发 bug,其他事务正在提交把 undo log 置 null 了,所以产生 NPE。
bug 已经修复,感谢报告问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants