litestream 0.16.0 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2ce16c53c02cc54eb6e402900815afe3808cab5ba49e033f7324c9159f7083c
4
- data.tar.gz: 32a21e3c20fa3fe8a58f985d770faeb3d862f316a1c7a89934c5b1cb34bde832
3
+ metadata.gz: 908a205fdef352b4a61c74b1a6d0a02217bc596d9b0e2c254bf993c0beab0a6e
4
+ data.tar.gz: 3403399fa91ed7236b96fd52fd56959301138d66327298ec7e75d9becabe43ce
5
5
  SHA512:
6
- metadata.gz: 837b32acb2dbb433753729da2a41d31913dbfecad1e1aff78695e713ecf44b8b27f522ebf5ca0006121c4358872d0e1928208452b6152ac0bc08396ecf19800a
7
- data.tar.gz: 6162700c2cc73ed56b88bac09f386a4b6d2ce10d2d84acbe718e7406908efbfdd305ab5933f44a8ccf3ae3aa646139b1a673786ecde1c32cd08e46022b306b50
6
+ metadata.gz: d027aaeb1729b542b9a92b3938cde2fc2fcd6be47a44d39661e194dfe75bec17a2aebda1a0a1f18383233eb95b981b1f0065588badeec922e3c66e5485e71d18
7
+ data.tar.gz: d5dbf47b5d0911f5b10d8ba780017634733bc1ab599d596ff45302d9a0aa7488306f8f32fff1156af6edb16ded0ce8d1ff474182bd641f3645af63c2a3f8b037
data/README.md CHANGED
@@ -503,6 +503,20 @@ The removed `generations`, `snapshots`, and `wal` command methods and rake tasks
503
503
 
504
504
  The 0.5 `restore` command auto-detects both 0.3 and LTX backups and prefers whichever backup is newer. Existing 0.3 `generations/` objects are left in place; you can delete them after the LTX history covers your full retention window. To roll back, reinstall a 0.15.x release of this gem, which bundles Litestream 0.3.
505
505
 
506
+ ### Known issues with Litestream 0.5.17
507
+
508
+ These were found running 0.5.17 in production (see [#84](https://github.com/fractaledmind/litestream-ruby/issues/84)):
509
+
510
+ - **Deploy overlap.** Litestream 0.5.17 takes no lock on the database it replicates. When a deploy starts the new container before stopping the old one, as Kamal does, both run `litestream replicate` against the same database until the old one stops. This can upload a corrupt LTX file. A lock in this gem is planned.
511
+ - **Stalled compaction.** A corrupt LTX file at level 0 makes every compaction that includes it fail, without any error your app would see, and level-0 files then pile up. Keep an eye on the count, for example from a recurring job:
512
+
513
+ ```ruby
514
+ Litestream::Commands.ltx("storage/production.sqlite3", json: true, "--level" => "0").size
515
+ ```
516
+
517
+ A count that keeps growing means compaction is stuck.
518
+ - **Connection leak.** While compactions keep failing, Litestream 0.5.17 leaks a connection on each attempt, which can exhaust a host's network memory. This is fixed upstream ([benbjohnson/litestream#1500](https://github.com/benbjohnson/litestream/pull/1500)) but not yet released. This gem will move to the first Litestream release that includes the fix.
519
+
506
520
  ### Using in development
507
521
 
508
522
  By default, if you install the gem and configure via `puma.rb` or `Procfile`, Litestream will not start in development.
@@ -1,3 +1,3 @@
1
1
  module Litestream
2
- VERSION = "0.16.0"
2
+ VERSION = "0.16.1"
3
3
  end
@@ -7,12 +7,12 @@ Puma::Plugin.create do
7
7
  def start(launcher)
8
8
  @log_writer = launcher.log_writer
9
9
 
10
+ in_background do
11
+ monitor_litestream
12
+ end
13
+
10
14
  launcher.events.on_booted do
11
15
  @litestream_pid = Litestream::Commands.replicate(async: true)
12
-
13
- in_background do
14
- monitor_litestream
15
- end
16
16
  end
17
17
 
18
18
  launcher.events.on_stopped { stop_litestream }
@@ -45,7 +45,7 @@ Puma::Plugin.create do
45
45
  end
46
46
 
47
47
  def litestream_dead?
48
- Process.waitpid(litestream_pid, Process::WNOHANG)
48
+ Process.waitpid(litestream_pid, Process::WNOHANG) if litestream_pid
49
49
  false
50
50
  rescue Errno::ECHILD, Errno::ESRCH
51
51
  true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: litestream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Margheim