Skip to content

Instantly share code, notes, and snippets.

@cyx1231st
cyx1231st / 3-stage-indexing-inside-node.md
Last active April 11, 2021 06:27
in-node 3-stage indexing

The 3 stages

STAGE_LEFT (2)

  • shard
  • pool
  • crush_hash

STAGE_STRING (1)

  • ns
@cyx1231st
cyx1231st / crimson_messenger_TODOs.md
Last active May 9, 2019 14:09
Crimson messenger TODOs
  • Lossless policy in both v1 and v2:
    • Current replacing logic is wrong and partially implemented.
    • Wait and standby states not implemented.
    • Fault handling in all connection states.
    • Message acknowledgement, requeue and correction.
  • Introduce a new protocol for loopback connection;
  • Port MessageRef to seastar smart pointer.
  • Listen on multiple addresses and change to use entity_addrvec_t for Connection::peer_addr
  • Validation tools
  • Simulate racing connections.
@cyx1231st
cyx1231st / gist:4eca14ff7a5dfa25758c5b6a8ab7bd79
Last active April 19, 2019 07:22
[Interface] Dispatcher::ms_dispatch() -> seastar::future<>
We currently implements a loop [1] to read the messages and dispatch them immediately without wait [2] (i.e. no chained future between read_message() and ms_dispatch()). But the interface ms_dispatch() still return a future<> to notify the msgr when it is completed, which is used for:
* Delay closing the connection until all ms_dispatch() are completed [3];
* Delay shutdown the messenger until all connections are closed successfully [4];
So basically, this future<> is used for messenger lifecycle managements.
But we suspect whether the above scenarios make sense:
* The messenger lifecycle management is duplicated with shared_ptr.
- We can let the concrete dispatchers hold the strong reference of the still-in-use connection and its messenger;
- The connection itself is stateful. During dispatching, concrete dispatcher is able to deal with the case when the messenger is shutdown.
* The responsibility to track the dispatching work is outside the scope of the messenger.
From 6e767130c946cc92865f4fd8347197c8b31770e0 Mon Sep 17 00:00:00 2001
From: Yingxin <yingxin.cheng@intel.com>
Date: Wed, 10 Jan 2018 12:47:35 +0800
Subject: [PATCH 4/4] Profile librbd-object-write lttng
---
src/CMakeLists.txt | 1 +
src/common/RbdobjectreqTrace.cc | 142 ++++++++++++++++++++++++++
src/common/RbdobjectreqTrace.h | 43 ++++++++
src/common/options.cc | 4 +
From cdb38e88d6a184ba361f2220ffc13338de48c31e Mon Sep 17 00:00:00 2001
From: Yingxin <yingxin.cheng@intel.com>
Date: Mon, 8 Jan 2018 11:12:39 +0800
Subject: [PATCH 3/4] Profile librbd-write-aio lttng
---
src/CMakeLists.txt | 1 +
src/common/RbdimagereqTrace.cc | 167 ++++++++++++++++++++
src/common/RbdimagereqTrace.h | 48 ++++++
src/common/options.cc | 4 +
From e044e6714ca3da76fb563ec54d91a9e2765912fc Mon Sep 17 00:00:00 2001
From: Yingxin <yingxin.cheng@intel.com>
Date: Fri, 27 Oct 2017 06:36:39 -0400
Subject: [PATCH 2/4] Profile radoswrite lttng
---
src/CMakeLists.txt | 1 +
src/ceph_osd.cc | 2 +
src/common/RadoswriteTrace.cc | 192 ++++++++++++++++++++++++++++
src/common/RadoswriteTrace.h | 53 ++++++++
From d9e15f2a9a788fffd82205552564ce85c97b3c6c Mon Sep 17 00:00:00 2001
From: Yingxin <yingxin.cheng@intel.com>
Date: Mon, 31 Jul 2017 09:52:32 +0000
Subject: [PATCH 1/4] fix repo for fast build(no test/debug/java)
---
.gitignore | 20 +++
CMakeLists.txt | 4 +-
debian/ceph-base.install | 2 -
debian/ceph-mon.install | 1 -