Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM Client/Server » View Thread |
Messages 1 to 3 of 3 total |
LockSemaphore not respected between servers |
Sun, Feb 26 2023 5:07 AM | Permanent Link |
Norman Rorke | I have two servers accessing the same database. It appears that, unlike the table.Lock function which fails if the same table has already been locked by an application on another server, the table.LockSemaphore function allows two applications to successfully lock the same semaphore if the applications are accessing the target table through different servers.
Can somebody confirm that this is the case. |
Sun, Feb 26 2023 2:29 PM | Permanent Link |
Raul Team Elevate | <<
I have two servers accessing the same database. It appears that, unlike the table.Lock function which fails if the same table has already been locked by an application on another server, the table.LockSemaphore function allows two applications to successfully lock the same semaphore if the applications are accessing the target table through different servers. Can somebody confirm that this is the case. >> Can you clarify what do you mean by servers - i.e. are they using local or remote sessions ? Did a quick test and works OK for me when using remote - LockSemaphore fails for any other session (on same or different DBSRVR) against the same DB and table. I have one server on 12005 and one on 12007 - app instance A on 12005 uses myTable.LockSemaphore(10) which succeeds. App instance 2 on 12007 sees myTable.LockSemaphore(10) as failed. App instance 3 on 12005 also fails (as expected). Raul |
Sun, Feb 26 2023 4:56 PM | Permanent Link |
Norman Rorke | Raul wrote:
<< Can you clarify what do you mean by servers - i.e. are they using local or remote sessions ? Did a quick test and works OK for me when using remote - LockSemaphore fails for any other session (on same or different DBSRVR) against the same DB and table. I have one server on 12005 and one on 12007 - app instance A on 12005 uses myTable.LockSemaphore(10) which succeeds. App instance 2 on 12007 sees myTable.LockSemaphore(10) as failed. App instance 3 on 12005 also fails (as expected). Raul >> Raul, Thanks for checking and confirming. I have subsequently debugged and found the issue, my semaphore parameter is calculated dynamically and this is where things went wrong. All sorted now. |
This web page was last updated on Thursday, March 28, 2024 at 06:05 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |