Teemu Huovila [Wed, 1 Jun 2016 09:24:57 +0000 (12:24 +0300)]
lib-fts: Improved stopword file reading.
The reading tries to be a little bit stricter now. Only stopwords at the
start of a new line are accepted now. Changed fi stopwords accordingly.
Also removed superfluous stack allocation in parsing.
Timo Sirainen [Wed, 1 Jun 2016 21:52:37 +0000 (00:52 +0300)]
dict: Pipelined iteration replies may have been hanging.
For example:
- lookup start
- iterate start
- iterate finished, but can't reply yet
- lookup finished
- iterate reply can be sent now, but wasn't previously
Timo Sirainen [Tue, 31 May 2016 19:33:32 +0000 (22:33 +0300)]
fs-metawrap: Fixed buffer size while reading metadata header.
It's not enough to have the buffer size set to "large enough" at the time of
the stream creation, because i_stream_set_max_buffer_size() could be called
afterwards.
Timo Sirainen [Tue, 31 May 2016 19:19:37 +0000 (22:19 +0300)]
lib: Fixed max_buffer_size handling in istream-chain
The default max_buffer_size=256 was wrong in all situations.
We're now assuming that the underlying istreams' max_buffer_size is always
correct. While gluing together two streams we're now allocating enough
memory to hold all of the wanted data (instead of assert-crashing as could
have happened earlier). This means that the max memory usage is actually
the two streams' max_buffer_size summed together. Ideally this would be
fixed to limit the max_buffer_size to maximum of the two, but that would
require further changes.
Timo Sirainen [Fri, 20 May 2016 12:16:41 +0000 (15:16 +0300)]
o_stream_send_istream() API changed again
The new API enforces the caller to correctly handle all the possible
situations. It also makes in unambiguous whether to wait for input or
output stream.
Stephan Bosch [Wed, 25 May 2016 21:41:47 +0000 (23:41 +0200)]
lib-http: client: Fixed bug in handling of lost connections while returning from another ioloop.
At one instance the http_client_connection_is_ready() function could have destroyed the connection while the caller still depended on it.
Renamed the http_client_connection_is_ready() function to http_client_connection_check_ready().
This now returns -1 when the connection got destroyed. Before it returned a bool that just indicated whether the connection was ready or not.
So, there is no need anymore to preserve a connection reference while calling this function.
Stephan Bosch [Mon, 23 May 2016 00:38:49 +0000 (02:38 +0200)]
lib-http: client: Reworked connection close handling.
Now, the peer is immediately notified of the lost connection.
Before, this step was only taken when the connection was fully dereferenced.
To prevent recursive notifications between peer and connection, handling the loss of a connection is deferred to the request handler.
When a peer is freed, any associated lingering connections have conn->peer set to NULL.
Stephan Bosch [Sun, 22 May 2016 10:48:37 +0000 (12:48 +0200)]
lib-http: client: Prevent useless and unexpected request callbacks during http_client_deinit().
Requests are now destroyed before queues, hosts, peers and connections.
As a side-effect, requests are now removed from the client request list at http_client_request_destroy(), so that requests with lingering references will no longer make http_client_wait() hang.
Stephan Bosch [Sat, 21 May 2016 11:16:08 +0000 (13:16 +0200)]
lib-http: client: Improved request reference counting in connection code.
It should now always be clear when the connection object holds a reference to a request and when it is released.
Only while the reference is held, req->conn points to a connection.
This also makes the assertion in http_client_request_unref() more robust and clear.
Timo Sirainen [Wed, 25 May 2016 19:29:47 +0000 (22:29 +0300)]
cassandra: Added metrics=path connect setting.
Cassandra's metrics are written to the path in JSON format. It can be a file
or a FIFO. The path supports expanding the standard global %variables, such
as %{pid}
J. Nick Koston [Fri, 20 May 2016 00:15:49 +0000 (19:15 -0500)]
dsync: race condition where done/finish is received after one side has closed
We do not tell the remote we are closing if they have
already told us because they close the
connection after sending ITEM_FINISH or ITEM_DONE and will
not be ever receive anything else from us unless
it just happens to get combined into the same packet
as a previous response and is already in the buffer.
Timo Sirainen [Mon, 23 May 2016 15:46:09 +0000 (18:46 +0300)]
lib-index: Make sure cache compression doesn't clear the file unneededly.
This probably never happened with current code, except when the cache file
was already broken.
mail_cache_compress() unmapped cache when map_with_read==TRUE, but we never
mapped it back. This would cause cache copying code to think cache was
unusable and not copy anything.