From f78726f337bf3e04db7e6e87c51fea9386e656a1 Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Thu, 28 Oct 2021 02:17:26 +0300 Subject: [PATCH] Add partitions to watcher upon restoring the core --- server/server.go | 3 +++ todo.todo | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/server/server.go b/server/server.go index 161bd0b..91d6e30 100644 --- a/server/server.go +++ b/server/server.go @@ -300,6 +300,9 @@ func restoreCore() { paritition, err := os.OpenFile(partitionPath, os.O_CREATE|os.O_WRONLY, 0644) check(err) cs.partitions = append(cs.partitions, paritition) + + err = watcher.Add(paritition.Name()) + check(err) } cs.partitionIndex = csExport.PartitionIndex cs.partitionSizeLimit = csExport.PartitionSizeLimit diff --git a/todo.todo b/todo.todo index 855a18d..7be53c9 100644 --- a/todo.todo +++ b/todo.todo @@ -2,7 +2,7 @@ - [x] Handle escapes in strings. Example: `"\"hello world\";v=\"42\", "` - [x] Add `limit` helper to the query language - [x] Stream metadata from server in `QUERY` mode to inform client about the progress -- [] Add `-persistent` option and implement persistent storage +- [x] Add `-persistent` option and implement persistent storage - [] Write a client library for Python - [] Implement mechanisms to reduce data redundancy - [] Improve the querying speed by tracking checksums of strings