Ivan Artiukhov created IGNITE-23967:
---------------------------------------

             Summary: pyignite3: "Failed to find resource with id: 1" on 
Cursor.fetchAll()
                 Key: IGNITE-23967
                 URL: https://issues.apache.org/jira/browse/IGNITE-23967
             Project: Ignite
          Issue Type: Bug
          Components: thin client
            Reporter: Ivan Artiukhov
         Attachments: ignite3db-0.log.zip

Apache Ignite ver. 3.0.0-SNAPSHOT-sha1:fb713a0c857317e4fd56fbb243857e211cb67588

Steps:
 * start an AI3 node, initialize via CLI
 * run the following python code which uses AI3 Python thin client API. 

 
{code:java}
import pyignite3

TEST_ROWS_NUM = 1500
SERVER_ADDRESS = ['127.0.0.1:10800']

def create_and_populate_test_table(cursor, rows_num, table_name):
    cursor.execute(f'drop table if exists {table_name}')
    cursor.execute(f'create table {table_name}(id int primary key, data 
varchar, fl double)')
    print(f"Inserting {rows_num}")
    for i in range(rows_num):
        cursor.execute(f"insert into {table_name} values ({i}, 'Value-{i * 2}', 
{i / 2.0})")
        if (i + 1) % 100 == 0:
            print(f"Inserted {i + 1} records")

def connection():
    return pyignite3.connect(address=SERVER_ADDRESS)

def cursor():
    return connection().cursor()

def test_fetchall_table_many_rows(table_name, cursor):
    create_and_populate_test_table(cursor, TEST_ROWS_NUM, table_name)

    cursor.arraysize = 5
    cursor.execute(f"select id, data, fl from {table_name} order by id")

    rows_all = cursor.fetchall()
    
    assert len(rows_all) == TEST_ROWS_NUM

if __name__ == '__main__':
    test_fetchall_table_many_rows('TestTable', cursor()) {code}
 

 

Expected result:
 * the test ends without errors

Actual result:
 * the following error is constantly seen in the log of the server node:

{noformat}
2024-12-12 13:31:38:460 +0300 
[WARNING][defaultNode-srv-worker-1][ClientInboundMessageHandler] Error 
processing client request [connectionId=1, id=27933, op=51, 
remoteAddress=/127.0.0.1:46410]:Failed to find resource with id: 1
org.apache.ignite.internal.lang.IgniteInternalException: IGN-CMN-65535 
TraceId:66be5dc8-2bad-4e65-a017-8822b14fa5bc Failed to find resource with id: 1
    at 
org.apache.ignite.client.handler.ClientResourceRegistry.get(ClientResourceRegistry.java:82)
    at 
org.apache.ignite.client.handler.requests.sql.ClientSqlCursorNextPageRequest.process(ClientSqlCursorNextPageRequest.java:50)
    at 
org.apache.ignite.client.handler.ClientInboundMessageHandler.processOperation(ClientInboundMessageHandler.java:792)
    at 
org.apache.ignite.client.handler.ClientInboundMessageHandler.processOperationInternal(ClientInboundMessageHandler.java:866)
    at 
org.apache.ignite.client.handler.ClientInboundMessageHandler.processOperation(ClientInboundMessageHandler.java:630)
    at 
org.apache.ignite.client.handler.ClientInboundMessageHandler.channelRead(ClientInboundMessageHandler.java:336)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at 
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
    at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at 
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868)
    at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
    at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
    at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
    at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
    at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:829)
{noformat}
Full server node log attached.[^ignite3db-0.log.zip]

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to