We are using net/http Client.Timeout which was added in 1.3 and doesn't
exist in 1.2. There's no reason to keep backward compatibility with 1.2
since we're building our own binaries and go1.3 is available for those
who want to build their own binaries.
Prior to this change, empty group filling worked between t1 and t2,
where t1 is the timestamp of the earliest point and t2 is the timestamp
of the last point. This patch change the behavior of the fill() to use
the query start and end time as t1 and t2, respectively. This only
happens if the user specified the start time of the query. Otherwise,
there's a potential of filling millions of millions of groups, since the
default start time of the query is really really early.
Fix#791 - Removed load database config options from the daemon. Created an API endpoint and updated test.
Fix#745 - Added definition of continuous queries to load database config.
Close#792
Points in the joined series should have either the columns of the left
side or the columns of the right side of the join. Before this patch
join relied on merge to order the points of the two series and then join
consecutive points together. The merge emitted the union of the columns
of the two series, which caused the joined series to always have the
union of two series. This combined with the fact that the point's values
weren't adjusted to have nulls for the missing columns caused panic when
any operation is done on the points, e.g. addition.
Fix#740, Fix#781
There was one remaining reference to an incomplete struct type from c
which is value_array. The error printed by the compiler is intermittent,
meaning it compiles sometimes and print the error sometimes. Also,
value_array isn't strictly an incomplete data type since it contains a
pointer to an unknown data type but it's size could be computed.
Close#644
This commit also include lots of cleanup related to start up and
shutting down as well as logging. Below is an explanation of how the api
starts up and shuts down. It also covers the error conditions and how
they are handled.
networking/goroutine fixes
* break from TCP Accept() loop when connection closed, which was preventing shutdown to proceed
* make sure that UDP functionality doesn't write to writeSeries channel after it has been closed.
* clearer, more specific shutdown message
in particular:
* self.writers allows us to make sure things writing to writeSeries are done
(they do blocking calls to handleMessage()) whether udp or tcp
* self.connClosed lets us break from the Accept() loop,
see http://zhen.org/blog/graceful-shutdown-of-go-net-dot-listeners/ (quit channel)
* shutdown channel is now allCommitted
things can get a little complicated, so here's a little schematic of how the functions and
their logic relate:
indent for a call out or important code within. everything shown as one nested tree
server.go
go ListenAndServe
go committer
reads from self.writeSeries until closed, then writes to self.allCommitted
Serve
for {
Accept, breaks if err + connClosed
self.writers.Add()
go handleClient
for {
handleMessage
reads until err and writes to self.writeSeries until read failed
reads until EOF, ignores other handleMessage errors
}
conn.Close()
self.writers.Done()
}
self.writers.Wait()
close(self.writeSeries)
Close()
close(self.connClosed)
self.conn.Close()
wants confirmation on allCommitted channel; [timeout] returns within 5s
This commit fixes two bugs:
Don't try to parse "inf" retention policy when creating a shard
space. This caused a panic to be thrown when a shard space is created
with infinity. Fix#774
`getExpiredShards()` used shard duration to determine which shards are
expired but should be using shard retention duration instead. Close#769