Age | Commit message (Collapse) | Author |
|
|
|
Mnesia currently notifies the user if it detects a partitioned
network, but the options for resolving the situation are limited.
In practice, the only safe options are:
- set master_nodes and restart one of the affected 'islands'
- restart the entire system from backup
This patch introduces a way to resolve the situation without
restarting any nodes. The key to doing this safely is to
lock affected tables and run the merge function inside the same
transaction that merges the schema. Otherwise, one transaction
will merge the schema, after which writes to the database will
be replicated across the (potentially) inconsistent copies;
the transaction triggered by the asynchronous inconsistency event
will have to race to be the first to access the tables.
The normal call to merge the schema is done from mnesia_controller.
Previously, this was mnesia_schema:merge_schema().
The new function is merge_schema(UserFun), with the
following behaviour:
merge_schema(UserFun) ->
schema_transaction(
fun() ->
UserFun(fun(Arg) -> do_merge_schema(Arg) end)
end).
Where do_merge_schema(LockTabs) will execute the schema merge
as before, but also lock all tables in the list LockTabs which
have copies on the affected nodes (that is, everywhere the schema
table is locked).
The effect of this is to allow a wrapper function that calls the
merge and, if successful, continues to resolve the inconsistency
on the tables, knowing that they have now been locked on all
affected nodes.
The function that is actually called by the deconflict function
is mnesia_controller:connect_nodes(Nodes, UserFun), as in:
Tables = tables_to_deconflict(Node),
mnesia_controller:connect_nodes(
[Node], fun(MergeF) ->
case MergeF(Tables) of
{merged,_,_} ->
deconflict(Tables, Node);
Other ->
Other
end).
In the case where the merge fails, it is probably wise to
restart from a backup...
I have not run the mnesia test suite, as it is not available.
I have not updated documentation, as these functions are not
documented in the first place.
|
|
* sv/sasl-fix-get_status:
Prepare patch release
fix sys:get_status backward compatibility for sasl release_handler_1
OTP-8619 sv/sasl-fix-get_status
In R13B04 sys:get_status was modified to invoke format_status/2 in the
callback module if the module exports that function. This resulted in a
change to the term returned from calling sys:get_status on the supervisor
module, since supervisor is a gen_server and gen_server exports
format_status. The sasl release_handler_1 module had a dependency on the
pre-R13B04 term returned by sys:get_status when invoked on a supervisor, so
the R13B04 change broke that dependency.
This problem has been fixed by change release_handler_1 to handle both the
pre-R13B04 and R13B04 terms that sys:get_status can return from a
supervisor.
|
|
* bg/file-del_dir:
Adjust test of file:del_dir("..") to accept {error,einval}
|
|
OTP-8574: Option to allow invalid row OIDs
OTP-8594: Make snmp forward compatible with new crypto
OTP-8595: snmpc fails to compile BITS with "holes"
|
|
On FreeBSD, file:del_dir("..") will return {error,einval} rather
than the expected {error,eexist}, and so will file:del_dir("../.."),
and so on.
It could be argued that we should change the implementation of
file:del_dir/1 to remap the error code (as some other error codes
are remapped to reduce the differences between different platforms),
but the consistency gained does not seem to be worth the effort.
Therefore, until we'll find a real-world use case where it is
essential to have consistent error codes for file:del_dir("..") on
all platforms, change the test case to accept both errors.
|
|
|
|
In R13B04 sys:get_status was modified to invoke format_status/2 in the
callback module if the module exports that function. This resulted in
a change to the term returned from calling sys:get_status on the
supervisor module, since supervisor is a gen_server and gen_server
exports format_status. The sasl release_handler_1 module had a
dependency on the pre-R13B04 term returned by sys:get_status when
invoked on a supervisor, so the R13B04 change broke that dependency.
Change release_handler_1 to handle both the pre-R13B04 and R13B04
terms that sys:get_status can return from a supervisor.
|
|
* rd/erlang-eunit:
erlang-eunit.el: Require cl, as it is used
|
|
|
|
* bg/remove-stray-ose-support:
configure: Remove stray OSE/Delta support
Makefiles: Remove stray OSE/Delta support
kernel tests: Remove stray OSE/Delta support
system tests: Remove stray OSE/Delta support
erl_interface tests: Remove stray OSE/Delta support
epmd: Remove stray OSE/Delta support
epmd: #ifdef out start_epmd() for other platforms than VxWorks
emulator tests: Remove stray OSE/Delta support
emulator: Remove stray OSE/Delta support
emulator: Eliminate #ifdef for sys_tty_reset()
test_server: Remove stray support for OSE/Delta
OTP-8585 bg/remove-stray-ose-support
|
|
|
|
|
|
|
|
Remove code supporting testing on OSE/Delta.
Some cross-testing support only used by OSE/Delta is kept
(see the mention of OSE in test_server_internal.hrl), because
it could presumably be useful in the future if we are to test
some other embedded system.
|
|
* ks/kernel:
kernel: Clean up as suggested by tidier
OTP-8606 ks/kernel
|
|
|
|
Alert handling has been improved to better handle unexpected but valid
messages and the implementation is also changed to avoid timing related
issues that could cause different error messages depending on network
latency. Packet handling was sort of broken but would mostly work as
expected when socket was in binary mode. This has now been fixed.
|
|
OTP-8607: https default port not handled
|
|
crypto application changed to use NIFs instead of driver.
|
|
|
|
* hawk/reltool:
Make some cleanups
Ensure that {error, Reason} is returned even when server dies
Introduced a new embedded_app_type option
Removed spurious CDATA in documentation
Automatically include applications that must be started
Add app test SUITE
Add app and appup files to reltool
Add function to return status about the configuration
Improved handling of applications explicitly included releases
Created escript for simplified usage from makefiles
OTP-8590 hawk/reltool
|
|
* bg/compiler-suppress-result-ignored:
compiler tests: Eliminate "result of expression is ignored" warnings
Silence warnings for expressions that are assigned to "_"
OTP-8602 bg/compiler-suppress-result-ignored
It is now possible to suppress the warning in code such as
"list_to_integer(S), ok" by assigning the ignored value "_" like this: "_ =
list_to_integer(S), ok".
|
|
Deprecated functions designated to be removed in R14 has been removed.
Also, some new functions has been marked as deprecated (the old http client
api module).
|
|
|
|
* ta/code_clash-filter-error:
code:clash/0: match correct return value from erl_prim_loader:list_dir/1
|
|
* ta/asn1-gratuitous-output:
Remove gratuitous ok report in asn1ct
|
|
* ta/nested-records:
Document R14 paren-less record access/update
Support nested record field access without parentheses
OTP-8597 ta/nested-records
Nested records can now be accessed without parenthesis. See the Reference
Manual for examples. (Thanks to YAMASHINA Hio and Tuncer Ayaz.)
|
|
|
|
|
|
* ms/re_infinite_loop:
Add testcase for infinite loop problem caused by reset of match_call_count
re: Fix non-termination for a certain regular expression
OTP-8589 Pcre may hang on a special regexp
A bug in re that could cause certain regular expression matches never to
terminate is corrected. (Thanks to Michael Santos and Gordon Guthrie.)
|
|
|
|
|
|
|
|
|
|
Original patch from YAMASHINA Hio posted to erlang-patches@
on Tue Jun 12 11:27:53 CEST 2007:
http://www.erlang.org/pipermail/erlang-patches/2007-June/000182.html
http://fleur.hio.jp/pub/erlang/record2.patch
Only had to do minor changes to port the patch to the
current R14A development tree.
Also added compiler/record_SUITE:nested_access/2 to test
nested record access with or without parentheses.
With this change the following will work.
-record(nrec0, {name = <<"nested0">>}).
-record(nrec1, {name = <<"nested1">>, nrec0=#nrec0{}}).
-record(nrec2, {name = <<"nested2">>, nrec1=#nrec1{}}).
nested_access() ->
N0 = #nrec0{},
N1 = #nrec1{},
N2 = #nrec2{},
<<"nested0">> = N0#nrec0.name,
<<"nested1">> = N1#nrec1.name,
<<"nested2">> = N2#nrec2.name,
<<"nested0">> = N1#nrec1.nrec0#nrec0.name,
<<"nested0">> = N2#nrec2.nrec1#nrec1.nrec0#nrec0.name,
<<"nested1">> = N2#nrec2.nrec1#nrec1.name,
<<"nested0">> = ((N2#nrec2.nrec1)#nrec1.nrec0)#nrec0.name,
N1a = N2#nrec2.nrec1#nrec1{name = <<"nested1a">>},
<<"nested1a">> = N1a#nrec1.name,
N2a = N2#nrec2.nrec1#nrec1.nrec0#nrec0{name = <<"nested0a">>},
N2b = ((N2#nrec2.nrec1)#nrec1.nrec0)#nrec0{name = <<"nested0a">>},
<<"nested0a">> = N2a#nrec0.name,
N2a = N2b,
ok.
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
* bg/compiler-fmove-opt:
beam_type: Improve coalescing of fmove/2 and move/2 instructions
|
|
|
|
* bg/deprecations:
test suites: Remove incidental use of deprecated concat_binary/1
Postpone removal of concat_binary/1
Remove deprecated lists:flat_length/1
OTP-8584 bg/deprecations
|
|
|
|
The function erl_scan:reserved_word/1 no longer returns true when given the
word spec. This bug was introduced in STDLIB-1.15.3 (R12B-3).
|
|
|
|
It is for embedded systems where all included applications must be
loaded from the boot script. If embedded_app_type is set to something
else than undefined all included applications will be included in
both the "rel" as well as in the "script".
|
|
|
|
Applications that are required to be started
before other applications according to their
app-file are now automatically included in
the release. The kernel and stdlib applications
are automatically included.
|
|
|
|
|
|
It is called reltool:get_status/1. The API functions in reltool
that may take PidOrOptions as input and actually gets Options
does now print out the warnings.
|
|
Applications that are listed in a release are now
automatically included.
|
|
|