-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HttpClient
does not update fields of type S.Optional(S.Set(S.String)))
#196
Comments
Thanks for raising this. Are you initializing your const client = new HttpClient({serverUrl, token, schema}); |
Oh, I might have forgotten that. I would love to try, but my local DB turned super duper slow after several failed migration attempts. Is there some way to clean up old (i.e. deleted) data from the tuple store? |
Hmm a couple questions
|
I ran some tests and indeed the in-browser DB comes to a crawl with too many updates. Is there some way to compact / snapshot the database to get rid of the history? |
What I did now was to:
This way I was able to reduce the amount of tuples inside the SQLite DB from ~70k to ~16k. At the same time the IndexedDB cache went from ~16k to ~900 entries. In any case this has improved the performance significantly. |
Thanks for the update. Writing and then reading, repeatedly, inside a single transaction is going to lead to suboptimal performance (as currently implemented). This is because inside a transaction we defer indexing of the new tuples created by a write operation until either the transaction is finished or until the next read. The interleaved queries you mentioned are very likely slowed down by this behavior. We've got a couple things on our list this week that should hopefully address some of this. We're currently implementing a normalized cache that should speed up relational queries. And if you can share a reproduction of your slow transaction we'll see what improvements we can find. |
I have a database that I want to migrate. Since I would rather not run the migration on every client, I have used the
HttpClient
in the backend to perform the table update. However, for some reason, the following function does not actually perform any update whenclient
is aHTTPClient
:If I run the same code in the frontend using a
TriplitClient
the update is performed successfully.In both cases, the sync server is reached, so for example I can insert elements just fine. For now I'll try to run the migrations on a specific administration page on the frontend, so that multiple clients don't try to migrate the data at the same time.
This is with newest triplit (just ran
pnpx up "@triplit/*"
today) librariesThe text was updated successfully, but these errors were encountered: