Giter VIP home page Giter VIP logo

Comments (4)

marevol avatar marevol commented on July 3, 2024
  1. It's not needed. ConfigSync has read/write permission for all files.
  2. Send POST requst to /_configsync/flush

from elasticsearch-configsync.

toanluu avatar toanluu commented on July 3, 2024

Thanks for you info. It seems the file content is not flushed in my setup. I use ES version 2.2.0 and install ConfigSync 2.2.0.
What i did:

  1. Create a file /tmp/user-dict.txt with content: "hello"
  2. curl -XPOST localhost:9200/configsync/file?path=test/user-dict.txt --data-binary @/tmp/user-dict.txt
  3. See that content in config/test/user-dict.txt is "hello"
  4. Change content in /tmp/user-dict.txt to "bonjour"
  5. curl -XPOST localhost:9200/configsync/file?path=test/user-dict.txt --data-binary @/tmp/user-dict.txt
    response: {"acknowledged":true}
  6. Check: curl -XGET localhost:9200/_configsync/file?path=test/user-dict.txt
    response: "bonjour"
  7. curl -XPOST http://localhost:9200/_configsync/flush
    response: {"acknowledged":true}
  8. Check content in config/test/user-dict.txt, it is still "hello"

In the ES log i just see a sequence of lines:
[2017-02-20 10:15:19,808][INFO ][org.codelibs.elasticsearch.configsync.service.ConfigSyncService] [Alex Wilder] Scheduled ConfigFileUpdater with 1m
[2017-02-20 10:16:19,812][INFO ][org.codelibs.elasticsearch.configsync.service.ConfigSyncService] [Alex Wilder] Scheduled ConfigFileUpdater with 1m
[2017-02-20 10:17:19,814][INFO ][org.codelibs.elasticsearch.configsync.service.ConfigSyncService] [Alex Wilder] Scheduled ConfigFileUpdater with 1m
....

Many thanks for looking at the issue.

from elasticsearch-configsync.

toanluu avatar toanluu commented on July 3, 2024

Maybe there is issue in logic of checking timestamp to apply the file modification.
On my machine, Zurich time zone, when the file is saved, its timestamp is the same as time on the machine: 11:50

However after 20 minutes (time on the machine is 12:10) I post new content, the content in index is:
_source": {
"path": "test/user-dict.txt",
"content": "aGFsbG8K",
"@timestamp": "2017-02-20T11:10:43.566Z"
}
So 11:10 < 11:50 => content is not modified.

from elasticsearch-configsync.

toanluu avatar toanluu commented on July 3, 2024

ok i see the line sdf.setTimeZone(TimeZone.getTimeZone("UTC")); is missing in the method getTimestamp compare to newest version. Could you please add that line for branch 2.2.x and make new build? Because of some constraints we cannot update our ES to version 5.x for now so we still have to use 2.2.0. Many thanks.

from elasticsearch-configsync.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.