Odd locked file behavior - Any assistance greatly appreciated

Discussion in 'Windows Server' started by Allen C., Aug 28, 2006.

  1. Allen C.

    Allen C. Guest

    I'll try to be as brief as possible. I have an application installed at one
    of our customer sites. The application creates data files (with trigger
    files) to feed other systems. Our customer has written a Java based
    application to move these export files from our application server to another
    system. The Java application doesn't monitor for our trigger file instead
    monitoring for a file to be created. Once the file appears in the file
    system their Java application attempts to move the file. Their thought
    process is that if we are creating/modifying the file then it will be locked
    so the Java app will not be able to process the file so it will in turn wait
    until a later time and try again. We are periodically running into a problem
    where our output file is truncated. Reviewing our log files indicate that we
    loose access (write/close/etc) to the file. My suspicion is that when their
    Java application makes a request to move the file just prior to our
    application writing to the file that it is causing the contention. I would
    be grateful if anyone can confirm my suspicions and point me to a technical
    article that I can forward to them so that they will modify their process.

    Thank you in advance.
    Allen
     
    Allen C., Aug 28, 2006
    #1
    1. Advertisements

  2. Allen C.

    Anthony Guest

    It just seems like a defective process at a basic level. I'm not sure what
    document would describe it. How could the java app know that the file is
    complete and that you are not about to start writing some more data to it,
    unless it read the contents and applied some logic to say the file was valid
    and complete - which is what your trigger does? You would have to either
    lock the file for exclusive use until it was ready, in your app, or signal
    to the java app that a new file was available when you app has finished
    writing the file.
    Anthony
     
    Anthony, Aug 28, 2006
    #2
    1. Advertisements

  3. Allen C.

    Allen C. Guest

    Anthony,

    Thank you for the quick response. I've sent an email to our developers
    confirming they lock the output files we are creating for exclusive use. I
    also wanted to give you some additional background information. We have no
    control over the Java application that our customer wrote to pick up the
    files. We requested that they use our triggers but instead they decided just
    issuing a file move command would be sufficient. What I've been trying to
    figure out is how could a move command impact a file that our application is
    building and is suppose to have exclusive control over? With that
    information (known issue/white paper/etc) I could go back to our customer and
    force them to start using our trigger files. Right now it is just our word
    (saying your move command is negatively impacting our file) and them saying
    (no, it is not).

    I've worked with data mover applications for years and I've never seen one
    using the logic, "I'll just issue a Move command. If the file isn't ready
    I'll get an error and will just wait a bit longer." All that I have seen
    either use a trigger/catalog file or monitor a file for growth over a period
    of time.
     
    Allen C., Aug 28, 2006
    #3
  4. Allen C.

    Anthony Guest

    Sorry, can't help with the document. Surely it depend what file locking
    method you use. If you are absolutely sure that they Move the file While you
    have it Locked, that is a failure of the locking mechanism, isn't it? You
    would have to check at exactly what stage of Your process the file is being
    moved, and whether it is supposed to be locked at that point or not. I
    suppose Filemon might tell you exactly what is going on with the file, if
    you could catch it in action,
    Anthony
     
    Anthony, Aug 28, 2006
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.