使用情况说明:
已经使用logstash拉取MySQL数据存储到es中,es中也创建了相应的索引,也存储了数据。假若把这个索引给删除了,再次进行同步操作的话要咋做,从最开始的数据进行同步,而不是新增的数据
官方原话:
The plugin will persist the sql_last_value parameter in the form of a metadata file stored in the configured last_run_metadata_path. Upon query execution, this file will be updated with the current value of sql_last_value. Next time the pipeline starts up, this value will be updated by reading from the file. If clean_run is set to true, this value will be ignored and sql_last_value will be set to Jan 1, 1970, or 0 if use_column_value is true, as if no query has ever been executed.
翻译:
插件将以sql_last_value元数据文件的形式保存配置文件中的参数last_run_metadata_path。执行查询后,该文件将更新为的当前值sql_last_value。下次管道启动时,将通过从文件中读取来更新此值。如果 clean_run设置为true,则将忽略此值并将其sql_last_value设置为1970年1月1日;如果use_column_value为true,则将其设置为0 ,就好像从未执行过任何查询一样。