fix atuin again
This commit is contained in:
parent
8da88a8ea5
commit
86d22b1559
2 changed files with 23 additions and 24 deletions
|
@ -1,6 +1,6 @@
|
|||
From b75e6fd3159896966dce2cf3af5b5be7e286ce1a Mon Sep 17 00:00:00 2001
|
||||
From 4797a2f62ab3d2716d313aa4a3170ba9672a93b6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
|
||||
Date: Mon, 6 Nov 2023 15:56:26 +0100
|
||||
Date: Fri, 22 Mar 2024 08:46:07 +0100
|
||||
Subject: [PATCH] make atuin on zfs fast again
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
|
@ -8,38 +8,38 @@ Content-Transfer-Encoding: 8bit
|
|||
|
||||
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
|
||||
---
|
||||
atuin-client/src/database.rs | 3 ++-
|
||||
atuin-client/src/record/sqlite_store.rs | 3 ++-
|
||||
atuin-client/src/database.rs | 4 ++--
|
||||
atuin-client/src/record/sqlite_store.rs | 2 ++
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/atuin-client/src/database.rs b/atuin-client/src/database.rs
|
||||
index c4b45302..29006d59 100644
|
||||
index b0bcae31..d8db492b 100644
|
||||
--- a/atuin-client/src/database.rs
|
||||
+++ b/atuin-client/src/database.rs
|
||||
@@ -130,7 +130,8 @@ pub async fn new(path: impl AsRef<Path>) -> Result<Self> {
|
||||
@@ -137,9 +137,9 @@ pub async fn new(path: impl AsRef<Path>, timeout: f64) -> Result<Self> {
|
||||
}
|
||||
|
||||
|
||||
let opts = SqliteConnectOptions::from_str(path.as_os_str().to_str().unwrap())?
|
||||
- .journal_mode(SqliteJournalMode::Wal)
|
||||
+ .journal_mode(SqliteJournalMode::Memory)
|
||||
.optimize_on_close(true, None)
|
||||
- .synchronous(SqliteSynchronous::Normal)
|
||||
+ .synchronous(sqlx::sqlite::SqliteSynchronous::Off)
|
||||
.with_regexp()
|
||||
.create_if_missing(true);
|
||||
|
||||
let pool = SqlitePoolOptions::new().connect_with(opts).await?;
|
||||
|
||||
diff --git a/atuin-client/src/record/sqlite_store.rs b/atuin-client/src/record/sqlite_store.rs
|
||||
index db709f20..eaed6f7a 100644
|
||||
index 6333bb27..1f25a55b 100644
|
||||
--- a/atuin-client/src/record/sqlite_store.rs
|
||||
+++ b/atuin-client/src/record/sqlite_store.rs
|
||||
@@ -37,7 +37,8 @@ pub async fn new(path: impl AsRef<Path>) -> Result<Self> {
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ pub async fn new(path: impl AsRef<Path>, timeout: f64) -> Result<Self> {
|
||||
|
||||
let opts = SqliteConnectOptions::from_str(path.as_os_str().to_str().unwrap())?
|
||||
- .journal_mode(SqliteJournalMode::Wal)
|
||||
.journal_mode(SqliteJournalMode::Wal)
|
||||
+ .journal_mode(SqliteJournalMode::Memory)
|
||||
+ .synchronous(sqlx::sqlite::SqliteSynchronous::Off)
|
||||
.foreign_keys(true)
|
||||
.create_if_missing(true);
|
||||
|
||||
let pool = SqlitePoolOptions::new().connect_with(opts).await?;
|
||||
--
|
||||
2.42.0
|
||||
|
||||
--
|
||||
2.43.1
|
|
@ -36,12 +36,11 @@
|
|||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
package = pkgs.unstable.atuin;
|
||||
# todo not needed anymore
|
||||
#package = pkgs.unstable.atuin.overrideAttrs (_old: {
|
||||
# # as cursed as doing mitigations=off in the kernel command line
|
||||
# patches = [ ./0001-make-atuin-on-zfs-fast-again.patch ];
|
||||
#});
|
||||
#package = pkgs.unstable.atuin;
|
||||
package = pkgs.unstable.atuin.overrideAttrs (_old: {
|
||||
# as cursed as doing mitigations=off in the kernel command line
|
||||
patches = [ ./0001-make-atuin-on-zfs-fast-again.patch ];
|
||||
});
|
||||
settings = {
|
||||
auto_sync = true;
|
||||
sync_frequency = "5m";
|
||||
|
|
Loading…
Reference in a new issue