Petals BC Filetransfer

Avoid to be blocked when trying to access locked files

Details

  • Description:
    Hide

    When reading a file with operations get, getAsAttachment and mget, a check is done to verify if the file is locked or not by another program. If the file is locked, the operation is blocked until the file can be locked by the BC FileTransfer. And so timeout can occurs.

    New locked file management:

    • for operations 'get' and 'getAsAttachment', if the file is locked, we wait few seconds before to return an error. The error returned is a fault to be able to manage it in a process point of view.
    • for operation 'mget', if a file is locked, we wait few seconds before to skip the file and continue with other files matching file patterns. No error is raised.

    The waiting time could be set at SU level: 'locking-wait-time', defined in seconds. This waiting time is checked per period defined by 'locking-poll-interval' in milliseconds.
    If not set at SU level, the global configuration at component level is used: 'locking-wait-time' and 'locking-poll-interval'.
    Default value at component level:

    • locking-wait-time: 5seconds,
    • locking-poll-interval: 1000ms

    Component level parameters can be changed at runtime.

    Show
    When reading a file with operations get, getAsAttachment and mget, a check is done to verify if the file is locked or not by another program. If the file is locked, the operation is blocked until the file can be locked by the BC FileTransfer. And so timeout can occurs. New locked file management:
    • for operations 'get' and 'getAsAttachment', if the file is locked, we wait few seconds before to return an error. The error returned is a fault to be able to manage it in a process point of view.
    • for operation 'mget', if a file is locked, we wait few seconds before to skip the file and continue with other files matching file patterns. No error is raised.
    The waiting time could be set at SU level: 'locking-wait-time', defined in seconds. This waiting time is checked per period defined by 'locking-poll-interval' in milliseconds. If not set at SU level, the global configuration at component level is used: 'locking-wait-time' and 'locking-poll-interval'. Default value at component level:
    • locking-wait-time: 5seconds,
    • locking-poll-interval: 1000ms
    Component level parameters can be changed at runtime.
  • Environment:
    -

Issue Links

Activity

Hide
Christophe DENEUX added a comment - Thu, 12 Dec 2019 - 13:25:22 +0100

Component level parameters can be changed at runtime with v5.1.0.

Show
Christophe DENEUX added a comment - Thu, 12 Dec 2019 - 13:25:22 +0100 Component level parameters can be changed at runtime with v5.1.0.
Hide
Christophe DENEUX added a comment - Wed, 11 Dec 2019 - 10:33:55 +0100

Merged in trunk

Show
Christophe DENEUX added a comment - Wed, 11 Dec 2019 - 10:33:55 +0100 Merged in trunk
Hide
Christophe DENEUX added a comment - Tue, 10 Dec 2019 - 16:37:24 +0100

Reopened to be merged in trunk and to be able to change configuration at runtime

Show
Christophe DENEUX added a comment - Tue, 10 Dec 2019 - 16:37:24 +0100 Reopened to be merged in trunk and to be able to change configuration at runtime
Hide
Christophe DENEUX added a comment - Tue, 10 Dec 2019 - 16:36:36 +0100

New locked file management added in branch petals-bc-filetransfer-5.0.x

Setting the configuration of both parameters at runtime is delayed to 5.1.x

Show
Christophe DENEUX added a comment - Tue, 10 Dec 2019 - 16:36:36 +0100 New locked file management added in branch petals-bc-filetransfer-5.0.x Setting the configuration of both parameters at runtime is delayed to 5.1.x

People

Dates

  • Created:
    Fri, 22 Nov 2019 - 18:11:56 +0100
    Updated:
    Thu, 12 Dec 2019 - 13:25:22 +0100
    Resolved:
    Thu, 12 Dec 2019 - 13:25:22 +0100