Skip to content

Commit

Permalink
more caveats
Browse files Browse the repository at this point in the history
  • Loading branch information
oldmoe committed Mar 12, 2024
1 parent 654986d commit cb0d2fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CAVEATS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ Container technology was originally designed for stateless applications. Based o

In its default configuration, Litestack allows one writer at a time to write to the database file, while simultaneously allowing any number of readers to access the database. Generally SQLite is pretty fast in writes, but you should be aware that a long running write operation will prevent any other writers from proceeding, for example creating an index on a very large table will stop other writers until the index creation is finished. There is no concurrent index creation facility in SQLite, yet.

## Litestack does not release the GVL

This comment has been minimized.

Copy link
@bopm

bopm Mar 27, 2024

Contributor

I just noticed this one, @oldmoe, while reading this. I guess it may help to resolve it.


This also applies to the Ruby SQLite3 gem, when it is performing a query, it will not allow any other threads in the Ruby process to resume until it returns. Care should be taken when writing low latency multi-threaded applications with Litestack, it is generally recommended to use fibers over threads in that case, since everything is serialized anyway it makes sense to avoid the ovreheads of mult-threaded environments

1 comment on commit cb0d2fa

@oldmoe
Copy link
Owner Author

@oldmoe oldmoe commented on cb0d2fa Mar 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are different issues, the busy handler code runs in Ruby space, hence it already releases the GVL, but that's only when you are waiting on a lock, what I am talking about here is that the GVL is not released during the query execution time, after the lock has been acquired

Please sign in to comment.