Repository navigation
Read the tile index read-only; set busy_timeout before other pragmas - #41
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
eliotmcintire
added a commit
that referenced
this pull request
Nov 8, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
eliotmcintire
added a commit
that referenced
this pull request
Nov 8, 2026
…hive audit) into modsForFireSense; 2.2.3.9011 Conflicts: version (9011), NEWS (both), prepClimateLayers.R (development's formatting + mods' gdal argument). Layer cache key unchanged (climateBuilderDigest identical before and after). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
achubaty
added a commit
that referenced
this pull request
Nov 9, 2026
Use #41's read-only connection instead of copying the 40 MB index on every call; the shipped index is no longer in WAL mode, so nothing is left beside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
achubaty
added a commit
that referenced
this pull request
Nov 9, 2026
development took 2.2.3.9011 for #41. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
achubaty
added a commit
that referenced
this pull request
Nov 9, 2026
The shipped index is in rollback-journal mode, so #41's read-only path needs no write access. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Looking up the latest climate year could fail with "database is locked" when many jobs started at once. Lookups now wait for the lock instead of failing, and no longer try to write to the database.
Affects: parallel runs on shared (NFS) libraries, where parsing fireSense modules sometimes died inside
latestHistoricalYear(); results are unchanged.Technical details
Defect:
sqlite_connect_db()(R/ClimateNA_createTiles.R:95-104) letdbConnectrunPRAGMA synchronousand then ranPRAGMA journal_mode = WALbeforePRAGMA busy_timeout, so both failed at once under contention.firstRunwas also TRUE when the file existed, andClimateNA_sql()coulddbCreateTableon a read path.Fix: connect with
synchronous = NULLand set busy_timeout first. Only writing connections set synchronous, and WAL only when the file is new.ClimateNA_sql()getsreadonly, which opensSQLITE_ROand never creates tables.latestHistoricalYear()andClimateNA_useTiles()use it.Tests (tests/testthat/test-sqliteConcurrency.R): 8 forked readers, a read-only check, and a lookup that must wait out a 2 s exclusive lock. The lock-wait and read-only tests fail on development ("database is locked") and pass here. The parallel test passes on local disk either way; the failure was seen on NFS (8/280 calls before, 0/280 after).
devtools::test(): 110 pass, 2 fail in test-prepClimateLayers.R (Drive downloads / parallel workers under load_all). R CMD check: Rd and codoc clean; remaining errors are the Drive-dependent prepClimateLayers example.🤖 Generated with Claude Code
https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6