logstash 官方论坛关于 track_time 值的回复

logstash 官方论坛关于 track_time 值的回复

版本 7.6.2 mac系统下同样遇到了 track_time 不变的问题,即使我修改为 update_time > :sql_last_value ,依然时间依然不会前进。

http://img1.sycdn.imooc.com//climg/5ee242790938d2a123641530.jpg

http://img1.sycdn.imooc.com//climg/5ee2423109c0fc3421981570.jpg

截图中可以看出,分别是22:22分和22:23分执行的两次,两次的条件都是 update_time > '2020-09-01 06:45:38' 继续执行,这个值依然不会增加。

logstash 官方论坛中,之前版本也出现过同样的问题。被采纳的回复中说:

When you set use_column_value => true then sql_last_value becomes the value of the tracking column from each record as it is processed and the last record wins (and is persisted). In this case make sure that the query has an ORDER BY insert_time clause. Make sure that you have a field called insert_time in your SELECT clause. Surely not all insert_time values are "2017-01-01 00:00:00.000000000 Z"?.

When you set it to false then the sql_last_value becomes a timestamp taken at the time just before the query is run and that value is persisted at the end of the run.

回复中建议使用order by解决此问题。

请问老师,是否可以使用 order by 解决此问题,使用order by 会不会出现一些新的问题呢

正在回答

登陆购买课程后可参与讨论,去登陆

1回答

之前有个同学在公司电脑上无法更新追踪时间,使用order by解决。后来他回家后重新部署了一下,没使用order by,神奇了,可以更新tracktime了。
关于该问题有一部分同学出现。一部分没有出现。推测也是官方的小bug,追加order by吧,哈哈哈

  • leslie1996 提问者 #1
    好哒,谢谢老师,这么晚还答疑解惑,太给力了
    2020-06-11 23:17:27
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师