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
This reverts commit 75269682ff.
Fix#756. We can't import common which in turn import protocol since
protocol contains generated files that aren't checked in the repo. Until
we have a better solution, i'll just revert this commit.