Skip to content

Instantly share code, notes, and snippets.

View lixen's full-sized avatar
🌴
Working from ....

Mikael Lixenstrand lixen

🌴
Working from ....
  • Vaggeryd Sweden
View GitHub Profile
@lixen
lixen / connect2beam
Created June 14, 2018 07:07 — forked from hcs42/connect2beam
connect2beam: a script that finds Erlang nodes and connect to them
#!/usr/bin/python
# connect2beam is a script that finds Erlang nodes and connects to them or
# kills them.
#
# Example for connection:
#
# $ connect2beam
# Available nodes: index name (cookie, pid)
#

Notes on Erlang Compiler

erlc

erts/etc/common/erlc.c

17:58:15 <0.1326.0>({riak_kv_index_hashtree,init,1}) {riak_kv_index_hashtree,
close_trees,
[{state,
936274486415109681974235595958868809467081785344,...}]}
17:59:03 <0.1326.0>({riak_kv_index_hashtree,init,1}) riak_kv_index_hashtree:close_trees/1 -> {state,
936274486415109681974235595958868809467081785344,
<0.1242.0>,
true,
true,
14:25:34 <0.1330.0>({riak_kv_index_hashtree,init,1}) {riak_kv_index_hashtree,
clear_tree,
[{state,
1027618338748291114361965898003636498195577569280,...}]}
14:27:17 <0.1330.0>({riak_kv_index_hashtree,init,1}) riak_kv_index_hashtree:clear_tree/1 -> {state,
1027618338748291114361965898003636498195577569280,
<0.1282.0>,
false,
false,
@lixen
lixen / redbug
Last active February 11, 2016 07:55
redbug:start(["hashtree:update_tree->return","hashtree:mark_clean_close->return", "hashtree:close->return", "riak_kv_index_hashtree:clear_tree->return", "riak_kv_index_hashtree:fold_fun->return", "riak_kv_index_hashtree:get_all_locks->return"],[{time,12000000},{msgs,50}, {print_depth,7}]).
redbug:start(["hashtree:destroy->return", "riak_kv_index_hashtree:init_trees->return","riak_kv_index_hashtree:close_trees->return", "riak_kv_index_hashtree:clear_tree->return", "riak_kv_index_hashtree:fold_fun->return", "riak_kv_index_hashtree:get_all_locks->return"],[{time,12000000},{msgs,50}, {print_depth,7}]).
14:17:34 <0.755.0>({riak_kv_index_hashtree,init,1}) riak_kv_index_hashtree:clear_tree/1 -> {state,
228359630832953580969325755111919221821239459840,
<0.701.0>,
[config]
## Set cluster name. This is used to identify running instances, so make sure
## it is unique between disjoint clusters under same AWS account.
name = rsltesting
## EC2 instance type to provision.
## rtcloud is designed to work with the following instances:
## cc2.8xlarge, cr1.8xlarge, hi1.4xlarge
## The following table shows instance details:
## ------------------------------------------------------------------------------------------------
ansible==1.5.3
ERROR: copy is not a legal parameter in an Ansible task or handler
using 2.0.0.2
[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). This feature will be removed in a
future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
PLAY ***************************************************************************
Lixenstrand-2:dev mikael$ dev2/bin/riak-admin aae-status
RPC to 'dev2@127.0.0.1' failed: {'EXIT',
{badarg,
[{erlang,hd,[[]],[]},
{riak_kv_entropy_info,
compute_exchange_info,4,
[{file,"src/riak_kv_entropy_info.erl"},
{line,218}]},
{riak_kv_entropy_info,
'-compute_exchange_info/2-lc$^1/1-1-',5,
riak_kv_index_hashtree stack trace
https://drive.google.com/open?id=0Bxy8PDW9yTsuQ0JwV1lUMEZsMkE
1 {'$gen_call',{<0.578.0>,#Ref<0.0.0.28270>},
{participate_in_sweep,<0.578.0>}}
2 {'$gen_cast',poke}
3 {'$gen_cast',poke}
4 {'$gen_cast',poke}
5 {'$gen_cast',poke}
6 {'$gen_cast',poke}
The 3 modules use the sweeper:
AAE tree rebuild
Object expiry
Tombstone reaper
The sweeper adds support for modules to register fold jobs they would like to have scheduled.
This mechanism lets us perform a number of processing tasks on the IOPs/bandwidth needed to sweep the data.
The sweeper keeps track of which partition that needs to be scheduled and ask all partispants if they would like to join.
Object expiry: