python接口的subscribe时报了个错

python接口的subscribe时报了个错'Failed to subscribe to table stream_future_tick_5min. Can't find the message with offset [0].' ,订阅用的offset=0。

请先 登录 后评论

1 个回答

peter

可以通过getpersistencemeta检查下流表最小的offset

https://www.dolphindb.cn/cn/help/200/FunctionsandCommands/FunctionReferences/g/getPersistenceMeta.html?highlight=getpersistencemeta


raftGroup: -1
sizeOnDisk: 9,074,082
memoryOffset: 8,931,944
diskOffset: 3,214,397
asynWrite: true
sizeInMemory: 142,138
compress: true
hashValue: 4
lastLogSeqNum: -1
persistenceDir: '/data/ddb/server/persistence/stream_future_tick_5min'
totalSize: 9,074,082
retentionMinutes: 1,440


如上述结果,最小的offset是3,214,397,offset 0  第一条记录已经被过时回收掉了。在订阅时使用offset=0会出现上述错误。

可以使用最小的offset,或-1。

请先 登录 后评论
  • 1 关注
  • 0 收藏,582 浏览
  • wfHuang 提出于 2023-06-06 17:33

相似问题