Commit Graph

173 Commits

Author SHA1 Message Date
Mitchell Rosen
4c77f57f42 hide timing output behind UNISON_DEBUG=timing 2022-07-05 13:04:57 -04:00
mergify[bot]
3d0caa0d69
Merge pull request #3167 from unisonweb/travis/fixed-transaction-retry-delay
Use a fixed 100ms delay for transaction write lock retries
2022-06-30 18:26:11 +00:00
Chris Penner
4692447268
Add "namespace" to name lookup index (#3165)
* Add namespace to name lookup index

* Fix name index queries

* More instances for paths

* Sqlite changes

* Redundant import

* Update api transcripts

* Use GLOB for proper query optimization on namespace search

* Slight optimization

* Rename namespace size to match old name
2022-06-30 11:28:32 -06:00
Travis Staton
c0af7c2cef actually retry 2022-06-30 13:22:26 -04:00
Travis Staton
2679bb5915 Use a fixed 100ms delay for transaction write lock retries 2022-06-30 11:45:45 -04:00
Mitchell Rosen
da96da731c make valuesSql more efficient 2022-06-25 09:24:02 -04:00
Mitchell Rosen
71dd7448ed add Values literal to unison-sqlite 2022-06-25 00:15:13 -04:00
Chris Penner
815057febc Better messaging for transport errors during sync 2022-06-14 17:26:32 -06:00
Arya Irani
4f69bbd503 -fno-warn-orphans in orphans modules 2022-06-04 19:59:52 -04:00
Mitchell Rosen
8aa9805f9a replace Share.Hash with U.Util.Hash32 2022-06-04 13:31:37 -04:00
Mitchell Rosen
7e7b911226 Add U.Util.Hash32 2022-06-04 12:12:44 -04:00
Mitchell Rosen
d890c8fbe9 ⅄ trunk → arya/ooo-sync 2022-06-04 11:21:57 -04:00
Chris Penner
a85c43d8a4 Merge remote-tracking branch 'origin/arya/ooo-sync' into arya/ooo-sync 2022-06-03 15:50:08 -06:00
Chris Penner
6eddc56818 Commit cabal changes 2022-06-03 15:49:48 -06:00
Chris Penner
18266a13a8
Update input patterns and unisonConfig for Share paths. (#3080)
* Clean up docs and parsers for read/write remote namespaces for share

* Revive deprecated git parser so old unisonConfig's still work

* Don't hide git errors

* Fix CodeserverURI -> URI conversion

* Reflect the provided port in CodeserverURI

* Focus messaging around primary action
2022-06-03 15:31:43 -06:00
Arya Irani
da18e47b2e Add package.yaml workaround to stack rebuild issue 2022-06-03 13:07:33 -04:00
Arya Irani
df33c1e257 add when/Paths_ stuff to every package.yaml target
didn't put it into another PR, I'm sorry. But we can cherry-pick this out in a separate PR
2022-06-02 17:10:59 -04:00
Chris Penner
de62ee01d2
Update lib/unison-sqlite/src/Unison/Sqlite/JournalMode.hs
Co-authored-by: Mitchell Rosen <mitchellwrosen@gmail.com>
2022-06-02 15:10:09 -06:00
Chris Penner
548e84b31a Set WAL mode when viewing remote branches. 2022-06-02 14:34:22 -06:00
Chris Penner
785e71359e Extract update names index logic for easier use with sync algorithms 2022-06-01 16:42:54 -06:00
Arya Irani
63fc75416c Merge remote-tracking branch 'origin/trunk' into arya/ooo-sync
# Conflicts:
#	codebase2/codebase-sqlite/U/Codebase/Sqlite/Queries.hs
#	parser-typechecker/package.yaml
#	parser-typechecker/src/Unison/Codebase.hs
#	parser-typechecker/src/Unison/Codebase/SqliteCodebase.hs
#	parser-typechecker/src/Unison/Codebase/SqliteCodebase/Migrations/MigrateSchema3To4.hs
#	unison-cli/src/Unison/Codebase/Editor/Command.hs
#	unison-cli/src/Unison/Codebase/Editor/HandleCommand.hs
#	unison-cli/src/Unison/Codebase/Editor/Output.hs
#	unison-cli/src/Unison/Codebase/Editor/VersionParser.hs
#	unison-cli/src/Unison/CommandLine/OutputMessages.hs
2022-05-27 13:49:34 -04:00
Arya Irani
d9a0ddd2ca
Update lib/unison-prelude/src/Unison/Prelude.hs
Co-authored-by: Chris Penner <christopher.penner@gmail.com>
2022-05-27 00:11:04 -04:00
Chris Penner
5bf8f1c204
Causal hash/branch hash cleanup migration (#3073)
* Rename Branch.Hash -> Branch.CausalHash for clarity.

* WIP simplifying types for Causals and hashes

* Single type for causal hashes.

* Remove vestigial function

* Clean up some rogue hashes

* Formatting

* Fix tests

* Add namespace hash migration

* Cleanup

* Finish writing migration for bad branches, add some sanity checks too.

* Keep hash_object mappings up to date.

* Working migration

* More checks

* Dependency-order migration WIP

* Finish first draft of crawled migration strategy

* Improve speed and reliability of migration.

* Better migration logging

* Perform integrity checks once after all migrations are done.

* Considerably speed up migration by only re-hashing branches which have
the same causal hash as value hash.

* Clarify migration docs

* Move 'differing causal value hash' check to integrity checks

* Bump schema version for new codebases

* PR cleanup

* Remove commented out migration

* PR feedback cleanup

* Add integrity check for hash_objects.

* Correctly set 'changes' key

* Don't check hash object integrity in migrations

Some codebases (like mine) are borked in this area and we'll need to fix
them later on.

* Correct final migration number

* Check namespace hash even if branch has no children

* Rehash every branch regardless

* Use v4 of base.
2022-05-26 16:20:38 -06:00
Mitchell Rosen
aff981335c use BranchHash / PatchHash where appropriate 2022-05-26 16:05:23 -04:00
Arya Irani
f789e4310f reexport Data.Tuple.Only, move entityExists, update Sync error types 2022-05-25 18:18:32 -04:00
Arya Irani
f510365290 filled in a lot of things? 2022-05-12 18:03:00 -04:00
Mitchell Rosen
11b1cefaf7 ⅄ trunk → arya/ooo-sync 2022-05-05 15:09:06 -04:00
Chris Penner
e8ad5e6a17
Load names from index for faster definition and find endpoints (#3059)
Allow using names index to back the backend so we can call it faster from Enlil.
2022-05-05 11:19:09 -06:00
Mitchell Rosen
5707918fae ⅄ trunk → arya/ooo-sync 2022-04-26 13:36:56 -04:00
Mitchell Rosen
044f6ad727 some misc cleanup in sync code 2022-04-26 11:46:12 -04:00
Mitchell Rosen
4765d1366d implement rowsModified 2022-04-25 15:07:15 -04:00
mergify[bot]
06b4530091
Merge pull request #3051 from unisonweb/topic/relation-speed
Improve performance of various relation operations
2022-04-20 23:00:47 +00:00
Paul Chiusano
bb6a661328
use splitMember 2022-04-20 16:59:40 -05:00
Mitchell Rosen
3b8bd60531 ⅄ trunk → arya/ooo-sync 2022-04-19 22:29:24 -04:00
Mitchell Rosen
2128a6e60c fix comment 2022-04-19 17:47:29 -04:00
Mitchell Rosen
83c8e59c38 thing -> run 2022-04-19 17:38:41 -04:00
Mitchell Rosen
e7773ff06e make executeMany do less work on empty list 2022-04-19 17:26:29 -04:00
Paul Chiusano
50a6eaf0a1 Improve performance of various relation operations
- Use logarithmic lookups rather than O(n^2) algorithm for restrictDom/Ran
- Remove some duplication by defining some functions in terms of each other, using swap
- subtractDom/Ran avoids traversing the whole relation, O(k log k)
- Use Map.intersectWith for intersection, rather than scanning either relation
2022-04-16 16:49:30 -05:00
Mitchell Rosen
3fc9435d5f idempotentIO -> unsafeIO 2022-04-15 12:56:51 -04:00
Mitchell Rosen
b4fa3282aa delete a few unused transaction runners and clean up migrations 2022-04-15 10:46:17 -04:00
Mitchell Rosen
875787bc0d fix a couple transaction-inside-transaction bugs 2022-04-12 22:05:13 -04:00
Mitchell Rosen
a06e6352d0 extract unison-util-base32hex package 2022-04-12 15:51:03 -04:00
Mitchell Rosen
50ae4af63c commit in runWriteTransaction 2022-04-12 13:15:38 -04:00
Mitchell Rosen
53beb4ab3b ⅄ trunk → 21-12-04-use-unison-sqlite 2022-04-11 14:50:09 -04:00
Mitchell Rosen
3abdda60e3 ⅄ trunk → arya/ooo-sync 2022-04-11 10:12:11 -04:00
Mitchell Rosen
186b76530a refactor syncInternal to use transaction tech 2022-04-07 22:19:10 -04:00
Mitchell Rosen
af9be6743c generalize 2022-04-07 21:50:33 -04:00
Mitchell Rosen
4c66cc7bc4 more runTransaction variants 2022-04-07 19:32:47 -04:00
Mitchell Rosen
ff89287e90 add runWriteTransaction 2022-04-07 19:11:44 -04:00
Mitchell Rosen
fd839e4fa4 work on ooo-sync downloading entities 2022-04-07 13:57:35 -04:00