<feed xmlns='http://www.w3.org/2005/Atom'>
<title>atuin/atuin-client/src/record/sync.rs, branch main</title>
<subtitle>Turtle. A hard-fork of atuin, focusing on a more minimal feature set</subtitle>
<id>http://git.foss-syndicate.org/bpeetz/forks/atuin/atom/atuin-client/src/record/sync.rs?h=main</id>
<link rel='self' href='http://git.foss-syndicate.org/bpeetz/forks/atuin/atom/atuin-client/src/record/sync.rs?h=main'/>
<link rel='alternate' type='text/html' href='http://git.foss-syndicate.org/bpeetz/forks/atuin/'/>
<updated>2024-04-18T15:41:28Z</updated>
<entry>
<title>chore: move crates into crates/ dir (#1958)</title>
<updated>2024-04-18T15:41:28Z</updated>
<author>
<name>Ellie Huxtable</name>
<email>ellie@elliehuxtable.com</email>
</author>
<published>2024-04-18T15:41:28Z</published>
<link rel='alternate' type='text/html' href='http://git.foss-syndicate.org/bpeetz/forks/atuin/commit/?id=95cc472037fcb3207b510e67f1a44af4e2a2cae9'/>
<id>urn:sha1:95cc472037fcb3207b510e67f1a44af4e2a2cae9</id>
<content type='text'>
I'd like to tidy up the root a little, and it's nice to have all the
rust crates in one place</content>
</entry>
<entry>
<title>chore(ci): Add codespell support (config, workflow) and make it fix some typos (#1916)</title>
<updated>2024-04-05T14:51:57Z</updated>
<author>
<name>Yaroslav Halchenko</name>
<email>debian@onerussian.com</email>
</author>
<published>2024-04-05T14:51:57Z</published>
<link rel='alternate' type='text/html' href='http://git.foss-syndicate.org/bpeetz/forks/atuin/commit/?id=28b0b490f93fe9f7964d0593b9ba600f4b24663e'/>
<id>urn:sha1:28b0b490f93fe9f7964d0593b9ba600f4b24663e</id>
<content type='text'>
* Add github action to codespell main on push and PRs

* Add rudimentary codespell config

* ignore crate, inbetween etc

* [DATALAD RUNCMD] run codespell throughout fixing typo automagically but ignoring the failure due to ambigous typos

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w || :",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^

* [DATALAD RUNCMD] Do interactive fixing of  leftover ambigous typos

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w -i 3 -C 2",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^</content>
</entry>
<entry>
<title>feat: use ATUIN_TEST_SQLITE_STORE_TIMEOUT to specify test timeout of SQLite store (#1703)</title>
<updated>2024-02-12T09:25:06Z</updated>
<author>
<name>Eric Long</name>
<email>i@hack3r.moe</email>
</author>
<published>2024-02-12T09:25:06Z</published>
<link rel='alternate' type='text/html' href='http://git.foss-syndicate.org/bpeetz/forks/atuin/commit/?id=5a805dc22c99050db0a54f35e660516c57fa4b94'/>
<id>urn:sha1:5a805dc22c99050db0a54f35e660516c57fa4b94</id>
<content type='text'>
Low-end devices like RISC-V SBCs are sometimes too slow to initialize SQLite in 0.1s. Option to specify a higher value allows check to pass on such devices with relaxed restrictions.</content>
</entry>
<entry>
<title>feat: add progress bars to sync and store init (#1684)</title>
<updated>2024-02-08T13:34:41Z</updated>
<author>
<name>Ellie Huxtable</name>
<email>ellie@elliehuxtable.com</email>
</author>
<published>2024-02-08T13:34:41Z</published>
<link rel='alternate' type='text/html' href='http://git.foss-syndicate.org/bpeetz/forks/atuin/commit/?id=8460210202af4e48ea55c997bf2739a6f0570e4a'/>
<id>urn:sha1:8460210202af4e48ea55c997bf2739a6f0570e4a</id>
<content type='text'>
Replace lots of logging with some progress bars. This looks much nicer

I'd like to move it out of the atuin-client crate and into the atuin
crate. But first, I want to decouple a lot of the record moving, so it
can wait until that's done.</content>
</entry>
<entry>
<title>fix: correct download list for incremental builds (#1672)</title>
<updated>2024-02-04T20:06:47Z</updated>
<author>
<name>Ellie Huxtable</name>
<email>ellie@elliehuxtable.com</email>
</author>
<published>2024-02-04T20:06:47Z</published>
<link rel='alternate' type='text/html' href='http://git.foss-syndicate.org/bpeetz/forks/atuin/commit/?id=3ff2e2552f5b4db9c8b8e127ff833873902258c0'/>
<id>urn:sha1:3ff2e2552f5b4db9c8b8e127ff833873902258c0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: automatically init history store when record sync is enabled (#1634)</title>
<updated>2024-01-29T16:38:24Z</updated>
<author>
<name>Ellie Huxtable</name>
<email>ellie@elliehuxtable.com</email>
</author>
<published>2024-01-29T16:38:24Z</published>
<link rel='alternate' type='text/html' href='http://git.foss-syndicate.org/bpeetz/forks/atuin/commit/?id=366b8ea97bbe36ad5e3dd8d45f1e787ee2a7f223'/>
<id>urn:sha1:366b8ea97bbe36ad5e3dd8d45f1e787ee2a7f223</id>
<content type='text'>
* add support for getting the total length of a store

* tidy up sync

* auto call init if history is ahead

* fix import order, key regen

* fix import order, key regen

* do not delete key when user deletes account

* message output

* remote init store command; this is now automatic

* should probs make that function return u64 at some point</content>
</entry>
<entry>
<title>fix: add acquire timeout to sqlite database connection (#1590)</title>
<updated>2024-01-19T15:45:42Z</updated>
<author>
<name>Ellie Huxtable</name>
<email>ellie@elliehuxtable.com</email>
</author>
<published>2024-01-19T15:45:42Z</published>
<link rel='alternate' type='text/html' href='http://git.foss-syndicate.org/bpeetz/forks/atuin/commit/?id=8899ce5089091e21eae088da692468565401abba'/>
<id>urn:sha1:8899ce5089091e21eae088da692468565401abba</id>
<content type='text'>
* fix: add acquire timeout to sqlite database connection

This should fix #1503

I wasn't able to trigger enough IO pressure for the SQL connection to be
a problem.

This adds `local_timeout` to the client config. This is a float, and
represents the number of seconds (units in line with the other timeouts,
though those are ints). Users may well want to reduce this if they
regularly have issues, but by default I think 2s is fine and avoids a
non-responsive system in bad situations.

* tests</content>
</entry>
<entry>
<title>feat: add history rebuild (#1575)</title>
<updated>2024-01-16T11:25:09Z</updated>
<author>
<name>Ellie Huxtable</name>
<email>ellie@elliehuxtable.com</email>
</author>
<published>2024-01-16T11:25:09Z</published>
<link rel='alternate' type='text/html' href='http://git.foss-syndicate.org/bpeetz/forks/atuin/commit/?id=a2578c4521d4615d8265744ab51a1cc4f291605e'/>
<id>urn:sha1:a2578c4521d4615d8265744ab51a1cc4f291605e</id>
<content type='text'>
* feat: add history rebuild

This adds a function that will

1. List all history from the store
2. Segment by create/delete
3. Insert all creates into the database
4. Delete all deleted

This replaces the old history sync.

Presently it's incomplete. There is no incremental rebuild, it can only
do the entire thing at once.

This is ran by `atuin store rebuild history`

* fix tests

* add incremental sync

* add auto sync</content>
</entry>
<entry>
<title>feat: rework record sync for improved reliability (#1478)</title>
<updated>2024-01-05T17:57:49Z</updated>
<author>
<name>Ellie Huxtable</name>
<email>ellie@elliehuxtable.com</email>
</author>
<published>2024-01-05T17:57:49Z</published>
<link rel='alternate' type='text/html' href='http://git.foss-syndicate.org/bpeetz/forks/atuin/commit/?id=7bc6ccdd70422f8fc763e2fd814a481bc79ce7b5'/>
<id>urn:sha1:7bc6ccdd70422f8fc763e2fd814a481bc79ce7b5</id>
<content type='text'>
* feat: rework record sync for improved reliability

So, to tell a story

1. We introduced the record sync, intended to be the new algorithm to
   sync history.
2. On top of this, I added the KV store. This was intended as a simple
   test of the record sync, and to see if people wanted that sort of
   functionality
3. History remained syncing via the old means, as while it had issues it
   worked more-or-less OK. And we are aware of its flaws
4. If KV syncing worked ok, history would be moved across

KV syncing ran ok for 6mo or so, so I started to move across history.
For several weeks, I ran a local fork of Atuin + the server that synced
via records instead.

The record store maintained ordering via a linked list, which was a
mistake. It performed well in testing, but was really difficult to debug
and reason about. So when a few small sync issues occured, they took an
extremely long time to debug.

This PR is huge, which I regret. It involves replacing the "parent"
relationship that records once had (pointing to the previous record)
with a simple index (generally referred to as idx). This also means we
had to change the recordindex, which referenced "tails". Tails were the
last item in the chain.

Now that we use an "array" vs linked list, that logic was also replaced.
And is much simpler :D

Same for the queries that act on this data.

----

This isn't final - we still need to add

1. Proper server/client error handling, which has been lacking for a
   while
2. The actual history implementation on top
    This exists in a branch, just without deletions. Won't be much to
    add that, I just don't want to make this any larger than it already
    is

The _only_ caveat here is that we basically lose data synced via the old
record store. This is the KV data from before.

It hasn't been deleted or anything, just no longer hooked up. So it's
totally possible to write a migration script. I just need to do that.

* update .gitignore

* use correct endpoint

* fix for stores with length of 1

* use create/delete enum for history store

* lint, remove unneeded host_id

* remove prints

* add command to import old history

* add enable/disable switch for record sync

* add record sync to auto sync

* satisfy the almighty clippy

* remove file that I did not mean to commit

* feedback</content>
</entry>
<entry>
<title>Add connect timeout and overall timeout (#1238)</title>
<updated>2023-09-18T07:39:19Z</updated>
<author>
<name>Ellie Huxtable</name>
<email>ellie@elliehuxtable.com</email>
</author>
<published>2023-09-18T07:39:19Z</published>
<link rel='alternate' type='text/html' href='http://git.foss-syndicate.org/bpeetz/forks/atuin/commit/?id=351b3e8a57c9e0143b7b6f3ed2160dcdce00225e'/>
<id>urn:sha1:351b3e8a57c9e0143b7b6f3ed2160dcdce00225e</id>
<content type='text'>
* Add connect timeout and overall timeout

* Make it configurable

* Fix test

* Add docs</content>
</entry>
</feed>
