Skip to content

Instantly share code, notes, and snippets.

View shino's full-sized avatar

Shunichi Shinohara shino

View GitHub Profile
machi_ap_repair_eqc:64: prop_repair_par_test_...*failed*
in function eqc:quickcheck/1 (../src/eqc.erl, line 1276)
in call from machi_ap_repair_eqc:'-prop_repair_par_test_/0-fun-1-'/3 (test/machi_ap_repair_eqc.erl, line 66)
**exit:{bad_return_value,
{ok,{1114,10,<<"pre^824a0bc1-cdb7-4c90-b01f-e3925e16d677^1">>},
{state,
[{a,{p_srvr,a,machi_flu1_client,"localhost",7401,
[{chmgr,a_chmgr}]}},
{b,{p_srvr,b,machi_flu1_client,"localhost",7402,[{chmgr,...}]}},
{c,{p_srvr,c,machi_flu1_client,"localhost",7403,[{...}]}},

Investigate arbitrary atom creation possibility

Two skeptical functions, one in velvet and one in folsom.

velvet

stanchion_acl_utils:process_grant/2

process_grant([{Name, Value} | RestObjects], Grant) ->
    case Name of
% s3cmd -c .s3cfg.15018.alice multipart s3://test
s3://test/
Initiated Path Id
2015-08-26T07:10:12.000Z s3://test/a DOA4wU83SU6j-nV1Y45HBg==
2015-08-26T07:08:42.000Z s3://test/a GAfYS0s_QRypIzkCqEi1ig==
2015-08-26T07:13:59.000Z s3://test/c 5BqRuNRhT-2Bo5UGhN3MWA==
% s3cmd -c .s3cfg.15018.alice put ~/static/rand.100MB s3://test
/home/shino/static/rand.100MB -> s3://test/rand.100MB [part 1 of 20, 5MB]
@shino
shino / claimant-down-operation.md
Created July 22, 2015 15:11
Operation steps when claimant node is down in Riak cluster

Created 3-node healthy cluster. Node dev1 is claimant at this point.

% dev/dev1/bin/riak-admin member-status
================================= Membership ==================================
Status     Ring    Pending    Node
-------------------------------------------------------------------------------
valid      50.0%      --      '[email protected]'
valid      25.0%      --      '[email protected]'
valid      25.0%      --      '[email protected]'
## original
% time ./rebar.old eunit suites=riak_cs_storage_mr_test skip_deps=true
Building riak-cs-ee
==> rel (eunit)
==> riak_cs-2.1 (eunit)
  All 50 tests passed.
Cover analysis: /home/shino/b/g/riak_cs-2.1/.eunit/index.html
./rebar.old eunit suites=riak_cs_storage_mr_test skip_deps=true  11.90s user 5.37s system 116% cpu 14.840 total
% dev/dev1/bin/riak-cs escript $PWD/priv/tools/internal/select_gc_bucket.erl \
     -p 10017 -r 8 --to today 
% wc -l /tmp/tmp.txt
114 /tmp/tmp.txt
% head /tmp/tmp.txt
0       182687704666362864775460604089535377456991567872        365375409332725729550921208179070754913983135744                30623a098f6bcd4621d373cade4e832627b4f6  0df4ee08d2fa4f8f834be72af751758000000000 0df4ee08d2fa4f8f834be72af7517580        0
statusCode: 404
headers:
{
"x-amz-request-id": "89A2E273E33AD7CE",
"x-amz-id-2": "RhmfvUGAtmolyCNTFNTxEhaVsztfPAApmVL/DvFKmdmj/MnOIMPh22KyP5j7/hW6bcbnqplnUBI=",
"content-type": "application/xml",
"transfer-encoding": "chunked",
"date": "Wed, 01 Apr 2015 13:44:18 GMT",
"server": "AmazonS3"
}
@shino
shino / list_parts_node.js
Created April 1, 2015 13:30
List Parts of Multipat Upload Example by node.js with aws-sdk-js
"use strict";
var AWS = require('aws-sdk');
var region = process.argv[2];
var bucket = process.argv[3];
var key = process.argv[4];
var uploadId = process.argv[5];
AWS.config.update({region: region,
'use strict';
var fs = require('fs'), AWS = require('aws-sdk');
AWS.config.update( { "accessKeyId": "1VXEJGY5YMQBIFJTDUY8",
"secretAccessKey": "XFOhEhcsuZYekrGHuby_5o7-gQJlb_Ue2e0GRA==",
"region": "us-east-1",
'httpOptions': {'proxy': 'http://127.0.0.1:15018'}});
AWS.config.update({region: ''});
var s3 = new AWS.S3();
@shino
shino / cs-17.4.diff
Last active August 29, 2015 14:16
Dirty patch for Riak CS to work with Erlang/OTP 17.4
diff --git a/include/riak_cs.hrl b/include/riak_cs.hrl
index 8e0296f..d293b45 100644
--- a/include/riak_cs.hrl
+++ b/include/riak_cs.hrl
@@ -504,3 +504,11 @@
-define(OBJECT_BUCKET_PREFIX, <<"0o:">>). % Version # = 0
-define(BLOCK_BUCKET_PREFIX, <<"0b:">>). % Version # = 0
+
+-ifdef(namespaced_types).