Age | Commit message (Collapse) | Author |
|
Our headers start with a <<1>> and then four bytes indicating the length
of the header and its checksum. When the header is larger than 4090
bytes it will be split across multiple blocks in the file and will need
to be reassembled on read. The reassembly consists of stripping out
<<0>> from the beginning of each subsequent block in the
remove_block_prefixes/2 function. The bug here is that we tell
remove_block_prefixes that we're starting 1 byte into the current block
instead of 5, so it ends up removing one good byte from the header and
injecting one or more random <<0>>s.
Headers larger than 4k are very rare and generally require a view group
with a huge number of indexes or indexes with fairly large reductions,
which explains why this bug has gone undetected until now.
Closes COUCHDB-1319.
|
|
1) couch_file:sync could leave open fd's if close failed. Now we'll get a trace.
2) couch_file:append_term failing would be bad, so let's test that too.
backported from trunk r1150915
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1150918 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
Conflicts:
Makefile.am
acinclude.m4.in
apps/couch/src/couch_db.erl
apps/couch/src/couch_db_updater.erl
apps/couch/src/couch_rep.erl
apps/couch/src/couch_rep_reader.erl
apps/couch/src/couch_view.erl
apps/couch/src/couch_view_group.erl
rel/overlay/etc/default.ini
share/Makefile.am
src/couchdb/couch_query_servers.erl
src/ibrowse/Makefile.am
src/ibrowse/ibrowse.app.in
src/ibrowse/ibrowse.erl
src/ibrowse/ibrowse_app.erl
src/ibrowse/ibrowse_http_client.erl
src/ibrowse/ibrowse_lb.erl
src/ibrowse/ibrowse_lib.erl
src/ibrowse/ibrowse_sup.erl
src/ibrowse/ibrowse_test.erl
src/mochiweb/mochijson2.erl
test/etap/112-replication-missing-revs.t
test/etap/113-replication-attachment-comp.t
test/etap/140-attachment-comp.t
|
|
A couch_file process occasionally checks to see if it is being
monitored by any clients, and closes if not. Specifically, it checks
for at least two monitoring processes, because it assumes
couch_stats_collector is one of them. That assumption was wrong
for sys_db files, so they would shut down after a minute and need to
be reopened.
BugzID: 11641
|
|
Deleting a large file in the previous scheme has caused the Erlang VM
to become unresponsive (including making it drop out of the ring of
nodes).
The cause of this is currently unknown but Adam discovered that
explicitly calling file:close/1 on the file descriptor does not cause
this behavior.
Accordingly, I have typed in his suggested fix and tested it.
|
|
This reverts commit a14326a92817d5013c50887d52aaca10cf91d84d.
|
|
Adam discovered that explicitly calling file:close/1 on the file descriptor does
not cause the node to become unresponsive and drop out of the ring.
|
|
http://www.erlang.org/doc/efficiency_guide/commoncaveats.html#id52228
|
|
- Removal of couch_db and couch_ref_counter processes. Active DBs are
accessible through a protected ets table owned by couch_server.
- #full_doc_info{} in by_id and by_seq trees for faster compaction at the
expense of more disk usage afterwards. Proposed as COUCHDB-738 but not
accepted upstream.
- Replication via distributed Erlang.
- Better hot upgrade support (uses exported functions much more often).
- Configurable btree chunk sizes allow for larger (but still bounded)
reductions.
- Shorter names for btree fields in #db{} and #db_header{}.
- couch_view_group does not keep a reference to the #db{}.
- Terms are stored compressed (again).
|
|
|