[GH-ISSUE #34] Locking issues after update from 1.5.0 to >=1.6.0 (bug?) #27

Closed
opened 2026-05-23 08:26:34 -06:00 by gitea-mirror · 12 comments
Owner

Originally created by @pmioduszewski on GitHub (Jun 3, 2021).
Original GitHub issue: https://github.com/appy-one/acebase/issues/34

Originally assigned to: @appy-one on GitHub.

Hi,

After updating acebase from 1.5.0 to 1.6.0 and higher I'm experiencing issues with "locking".

I didn't change my code and have no idea how to deal with those locking issues right now.

On 1.5.0 everything working really fast almost instantly, but on 1.6.0+ same functions take even 1 minute for lightweight tasks with read lock on path ... in the console.

[localtest] Reading node "/user/1365174619/account" from address 2,60
[localtest] Reading node "/user/1365174619/account" from address 2,60
[localtest] Reading node "/user/1365174619/products/active" from address 1,789
[localtest] Reading node "/user/1365174619/account" from address 2,60
read lock on path "/" by tid 1 (Node.getInfo "/") is taking a long time to complete [1]
read lock on path "/" by tid 1 (Node.getInfo "/") is taking a long time to complete [2]
read lock on path "/" by tid 1 (Node.getInfo "/") is taking a long time to complete [3]
lock :: read lock on path "/" by tid 1 (Node.getInfo "/") took too long
[localtest] Node "/user/1365174619" being updated: adding 0 keys (), updating 0 keys (), removing 1 keys ("account")
[localtest] Node "/user/1365174619" saved at address 31,646 - 1 addresses, 24 bytes written in 1 chunk(s)

Are there any examples of "do this / don't do that" to avoid locking issues?

Node: 15.14.0

Originally created by @pmioduszewski on GitHub (Jun 3, 2021). Original GitHub issue: https://github.com/appy-one/acebase/issues/34 Originally assigned to: @appy-one on GitHub. Hi, After updating acebase from 1.5.0 to 1.6.0 and higher I'm experiencing issues with "locking". I didn't change my code and have no idea how to deal with those locking issues right now. On 1.5.0 everything working really fast almost instantly, but on 1.6.0+ same functions take even 1 minute for lightweight tasks with `read lock on path ...` in the console. ```js [localtest] Reading node "/user/1365174619/account" from address 2,60 [localtest] Reading node "/user/1365174619/account" from address 2,60 [localtest] Reading node "/user/1365174619/products/active" from address 1,789 [localtest] Reading node "/user/1365174619/account" from address 2,60 read lock on path "/" by tid 1 (Node.getInfo "/") is taking a long time to complete [1] read lock on path "/" by tid 1 (Node.getInfo "/") is taking a long time to complete [2] read lock on path "/" by tid 1 (Node.getInfo "/") is taking a long time to complete [3] lock :: read lock on path "/" by tid 1 (Node.getInfo "/") took too long [localtest] Node "/user/1365174619" being updated: adding 0 keys (), updating 0 keys (), removing 1 keys ("account") [localtest] Node "/user/1365174619" saved at address 31,646 - 1 addresses, 24 bytes written in 1 chunk(s) ``` Are there any examples of "do this / don't do that" to avoid locking issues? Node: 15.14.0
gitea-mirror 2026-05-23 08:26:34 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@appy-one commented on GitHub (Jun 4, 2021):

I ran into the same issue this week, I will be publishing an update today that should fix it

<!-- gh-comment-id:854460527 --> @appy-one commented on GitHub (Jun 4, 2021): I ran into the same issue this week, I will be publishing an update today that should fix it
Author
Owner

@appy-one commented on GitHub (Jun 4, 2021):

I have just published version 1.6.3, can you confirm this fixes your locking issue?

<!-- gh-comment-id:854638709 --> @appy-one commented on GitHub (Jun 4, 2021): I have just published version 1.6.3, can you confirm this fixes your locking issue?
Author
Owner

@pmioduszewski commented on GitHub (Jun 4, 2021):

I have just published version 1.6.3, can you confirm this fixes your locking issue?

image

Now everything works fast but still getting locking issues in the console. 🤔

<!-- gh-comment-id:854674301 --> @pmioduszewski commented on GitHub (Jun 4, 2021): > I have just published version 1.6.3, can you confirm this fixes your locking issue? ![image](https://user-images.githubusercontent.com/43101981/120800918-ce9e6d00-c540-11eb-8b75-129cc24fc277.png) Now everything works fast but still getting locking issues in the console. 🤔
Author
Owner

@appy-one commented on GitHub (Jun 4, 2021):

Can you enable verbose logging in AceBase's settings and post the details? eg use: new AceBase('dbname', { logLevel: 'verbose' })

<!-- gh-comment-id:854700853 --> @appy-one commented on GitHub (Jun 4, 2021): Can you enable verbose logging in AceBase's settings and post the details? eg use: `new AceBase('dbname', { logLevel: 'verbose' })`
Author
Owner

@appy-one commented on GitHub (Jun 4, 2021):

Please let me know how to reproduce this. Can you submit code?

<!-- gh-comment-id:854781824 --> @appy-one commented on GitHub (Jun 4, 2021): Please let me know how to reproduce this. Can you submit code?
Author
Owner

@pmioduszewski commented on GitHub (Jun 5, 2021):

This is strange, this lock issue appears in a random way now. I'm trying to find out minimal code to reproduce.

<!-- gh-comment-id:855229576 --> @pmioduszewski commented on GitHub (Jun 5, 2021): This is strange, this lock issue appears in a random way now. I'm trying to find out minimal code to reproduce.
Author
Owner

@appy-one commented on GitHub (Jun 6, 2021):

Another something that might help me investigating.. Is your code running in a cluster (eg using cluster.fork())?

<!-- gh-comment-id:855418989 --> @appy-one commented on GitHub (Jun 6, 2021): Another something that might help me investigating.. Is your code running in a cluster (eg using `cluster.fork()`)?
Author
Owner

@appy-one commented on GitHub (Jun 8, 2021):

Also, do you have indexes on the data? Please give me some more info, this needs to be fixed asap!

<!-- gh-comment-id:856539739 --> @appy-one commented on GitHub (Jun 8, 2021): Also, do you have indexes on the data? Please give me some more info, this needs to be fixed asap!
Author
Owner

@pmioduszewski commented on GitHub (Jun 9, 2021):

Also, do you have indexes on the data? Please give me some more info, this needs to be fixed asap!

Sorry, I've been really busy lately.

I've just sent you an email :)

<!-- gh-comment-id:857325481 --> @pmioduszewski commented on GitHub (Jun 9, 2021): > Also, do you have indexes on the data? Please give me some more info, this needs to be fixed asap! Sorry, I've been really busy lately. I've just sent you an email :)
Author
Owner

@appy-one commented on GitHub (Jun 9, 2021):

Thanks for the code, I managed to reproduce!
ref.count() appears to be the troublemaker here, I'll see what's going on there..

<!-- gh-comment-id:857455222 --> @appy-one commented on GitHub (Jun 9, 2021): Thanks for the code, I managed to reproduce! `ref.count()` appears to be the troublemaker here, I'll see what's going on there..
Author
Owner

@appy-one commented on GitHub (Jun 9, 2021):

I just published v1.6.4 which should fix this. Let me know if it works!

<!-- gh-comment-id:857637038 --> @appy-one commented on GitHub (Jun 9, 2021): I just published v1.6.4 which should fix this. Let me know if it works!
Author
Owner

@pmioduszewski commented on GitHub (Jun 9, 2021):

now it works like a charm! gj 😁👍

<!-- gh-comment-id:857897570 --> @pmioduszewski commented on GitHub (Jun 9, 2021): now it works like a charm! gj 😁👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase#27
No description provided.