syncthing/lib/db
Jakob Borg 1a703efa78 lib/model: Fix accounting error in rescan with multiple subs (fixes #3028)
When doing prefix scans in the database, "foo" should not be considered
a prefix of "foo2". Instead, it should match "foo" exactly and also
strings with the prefix "foo/". This is more restrictive than what the
standard leveldb prefix scan does so we add some code to enforce it.

Also exposes the initialScanCompleted on the rwfolder for testing, and
change it to be a channel (so we can wait for it from another
goroutine). Otherwise we can't be sure when the initial scan has
completed, and we need to wait for that or it might pick up changes
we're doing at an unexpected time.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3067
2016-05-09 12:56:21 +00:00
..
testdata Change DB label format (index folders, devices) 2016-01-03 19:32:40 +01:00
.gitignore Change DB label format (index folders, devices) 2016-01-03 19:32:40 +01:00
benchmark_test.go Benchmark must use *db.Instance 2015-11-05 17:46:53 +00:00
blockmap_test.go Change DB label format (index folders, devices) 2016-01-03 19:32:40 +01:00
blockmap.go Change DB label format (index folders, devices) 2016-01-03 19:32:40 +01:00
concurrency_test.go mv internal lib 2015-08-09 09:35:26 +02:00
debug.go Implement facility based logger, debugging via REST API 2015-10-03 18:09:53 +02:00
leveldb_convert_test.go Change DB label format (index folders, devices) 2016-01-03 19:32:40 +01:00
leveldb_convert.go Change DB label format (index folders, devices) 2016-01-03 19:32:40 +01:00
leveldb_dbinstance.go lib/model: Fix accounting error in rescan with multiple subs (fixes #3028) 2016-05-09 12:56:21 +00:00
leveldb_test.go lib: Use bytes.Equal instead of bytes.Compare where possible 2016-03-31 15:12:46 +00:00
leveldb_transactions.go lib/db: Empty slice is not nil (fixes #2872) 2016-04-09 07:46:19 +00:00
leveldb_xdr.go Use v2 of XDR package (auto generated) 2016-02-02 12:44:33 +01:00
leveldb.go Correct path to genxdr after the change to Go1.5+ vendoring 2016-03-09 12:43:16 +00:00
namespaced_test.go We should pass around db.Instance instead of leveldb.DB 2015-10-31 12:35:30 +01:00
namespaced.go We should pass around db.Instance instead of leveldb.DB 2015-10-31 12:35:30 +01:00
set_test.go tests: messagediff argument order should be expected, actual 2016-03-17 08:03:29 +01:00
set.go lib/model: Properly handle deleting multiple files when doing scans with subs (fixes #2851) 2016-03-18 12:16:33 +00:00
truncated.go Increase maximum allowed file size to 10 Mblocks 2016-03-04 16:24:54 +01:00
virtualmtime_test.go We should pass around db.Instance instead of leveldb.DB 2015-10-31 12:35:30 +01:00
virtualmtime.go Change DB label format (index folders, devices) 2016-01-03 19:32:40 +01:00