自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 收藏
  • 关注

原创 [Paper Reading] Alibaba Hologres: A Cloud-Native Service for Hybrid Serving/Analytical Processing

Hologres Storage Engine 摘要

2022-07-06 22:23:52 538 1

原创 [Paper Reading]The Snowflake Elastic Data Warehouse

Snowflake paper reading

2022-07-03 09:18:08 498

原创 MongoDB sharding中分布式锁机制

2020-03-24 19:11:00文章目录分布式锁原理1. `config.lockpings` 和 `config.locks` 集合中存储的内容config.lockpingsconfig.locks2. 与 `config.lockpings` 和 `config.locks` 的基本交互3. 分布式锁获取逻辑4. 加锁的场景5. 解锁场景分布式锁代码解析1. 核心类说明`DistLockCatalogImpl : DistLockCatalog` : 对分布式锁的一些具体操作`ReplSe.

2021-12-11 09:48:38 827

原创 MongoDB sharding 路由刷新策略 --StaleConfig

2020-09-21 10:05:481. mongos节点 收到用户 insert 请求mongos 收到一个 insert 请求后,会经过如下流程处理将请求发送给 shard 节点:ServiceEntryPointMongos::handleRequest() --> Strategy::clientCommand() --> runCommand() --> execCommandClient() --> ClusterWriteCmd::InvocationBas.

2021-12-11 09:42:46 830

原创 MongoDB sharding 隐式创建collection -- ImplicitCollection

2020-07-31 13:21:151. mongos节点 收到用户 insert 请求mongos 收到一个 insert 请求后,会经过如下流程处理将请求发送给 shard 节点:ServiceEntryPointMongos::handleRequest() --> Strategy::clientCommand() --> runCommand() --> execCommandClient() --> ClusterWriteCmd::InvocationBas.

2021-12-11 09:41:10 807

原创 MongoDB LogicalSession机制

文章目录LogicalSessionIdLogicalSession的标识 - lsidlogicalSession 信息(`lsid`) 生成logicalSession 信息(`lsid`) 处理存储lsidLogicalSessionCache 的 refresh机制 & reap机制refresh 机制 -- `LogicalSessionCacheImpl::_refresh()`step1 - 初始状态处理step2 - session 管理step3 - cursor 管理reap 机

2021-12-11 09:38:49 339

原创 MongoDB 路由表刷新导致响应慢

date: 2020-11-07 10.30:20MongoDB sharding 实例从 3.4版本 升级到 4.0版本 以后插入性能明显降低,观察日志发现大量的 insert 请求慢日志:2020-08-19T16:40:46.563+0800 I COMMAND [conn1528] command sdb.sColl command: insert { insert: "sColl", xxx} ... locks: {Global: { acquireCount: { r: 6, w: 2.

2021-12-11 09:28:45 482

原创 [Paper Reading] Bigtable: A Distributed Storage System for Structured Data

目录===== 1. Introduction===== 2. Data Model===== 2.1 Row===== 2.2 Column Family===== 2.3 Timestamp===== 3. API===== 4. Building Blocks===== 5. Implementation===== 5.1 Tablet Location===== 5.2 Tablet Assignment===== 5.3 Tablet Serving

2021-09-12 18:23:01 276

原创 MongoDB中 ServiceContext/Client/OperationContext的关系

date: 2020-08-03 11:03:12ServiceContext/** * Class representing the context of a service, such as a MongoD database service or * a MongoS routing service. * * A ServiceContext is the root of a hierarchy of contexts. A ServiceContext owns * zero o.

2021-08-28 09:23:50 224

原创 MongoDB Locks 实现简析

date: 2020-08-03 22:05:01MongoDB代码内部还有锁的机制来避免并发冲突,MongoDB中有4种锁的类型,分别是:MODE_IS : Intent shared,意向读锁MODE_IX : Intent exclusive,意向写锁MODE_S : Shared,读锁MODE_X : Exclusive,写锁下面是这4种锁的互斥矩阵:/** * LockMode compatibility matrix. * * This matrix answers .

2021-08-28 09:22:43 1683

原创 [Paper Reading] Tunable Consistency in MongoDB

===== 1. IntroductionThe gold standard of consistency for concurrent and distributed systems is linearizability.<Linearizability: A correctness condition for concurrent objects.> // TODOPACELC : <Consistency tradeoffs in modern distributed..

2021-08-28 07:41:29 239

原创 [Paper Reading] Dynamo: Amazon‘s Highly Available Key-value Store

Date: 202102文章主要在讲 如何实现一个A(vailability)&P(artition tolerance) 的系统,同时提供NWR的方式来支持用户在 performance / durability / availability 进行 tradeoff。在实现上述功能之前,首先对其系统边界进行了明确的描述:RDBMS 提供很多功能,但是大多数系统不需要(比如无须事务的系统)。所以Dynamo提供简单的kv模型,且value足够小,也弱化了ACID的特性支持那么如何.

2021-08-28 07:37:23 326

原创 [Paper Reading] Logical Physical Clocks and Consistent Snapshots in Globally Distributed Databases

文章立意在解决分布式系统中的时间戳问题,实践中我们经常需要基于某个物理时间来拿到一个一致性的快照状态,而目前的时间戳算法都不能很好的满足。物理时间基于NTP同步,而NTP同步存在跳变,不能确定因果关系 逻辑时间脱离了与物理时间 TrueTime 对硬件&协议又有着强依赖所以本文提出HLC,可以做到通用性,同时能像LC一样确定因果关系,同时又与PT相关联。随之将目标细化:要求1:e hb f --> l.e < l.f // 能像LC一样确定因果关系 要求2:Spac...

2021-08-28 07:22:51 482

原创 MongoDB 请求计数逻辑

date: 2020-04-22 17:25:43mongos上一个find请求堆栈主要路径是这个样子的:#0 mongo::(anonymous namespace)::ClusterFindCmd::Invocation::run at src/mongo/s/commands/cluster_find_cmd.cpp:205#1 0x00007f3701fae26a in mongo::(anonymous namespace)::execCommandClient at src/mo.

2021-08-26 22:41:03 429

原创 MongoDB ReplicaSetMonitor对shard探测机制

date: 2020-04-27 12:59:24tags: MongoDB:ReplicaSetMonitorsharding实例对后端 shard 会进行状态探测,以发现 shard 是否有节点更新( 选主、节点加入、节点异常)。提供探测能力的核心类为 ReplicaSetMonitor 及相关类。对于状态探测的基本逻辑应该也比较好构思:定期状态探测、探测结果存储、探测结果查询。MongoDB中也按照这个逻辑来完成的:ReplicaSetMonitor 提供状态查询的接口,以及定期探测触.

2021-08-26 22:38:19 275

原创 [Paper Reading] Presto: SQL on Everything

阅读时间:2021.7===== 1. Introduction能快速并且简单的从大量数据中提取分析变得越来越重要。Presto是一个开源的分布式SQL查询引擎,旨在具有适应性(adaptive)、灵活性(flexible)、可扩展性(extensible)。Presto提供 ANSI SQL接口来从存储中查询数据,暴露HTTP接口,支持JDBC,并兼容很多BI工具。Presto每天在 Facebook 处理千万亿的行,数百PB的数据。具备很多优秀的特性:多租户(multi-..

2021-08-25 22:33:16 371

原创 [Paper Reading] TiDB: A Raft-based HTAP Database

选择Raft协议来解决数据同步时效性、一致性及高可用的问题并在Raft协议中增加一个Learner角色,来解决数据同步到列存,同时不对性能造成影响。优化Raft协议提升性能:一定程度异步化通过增加readIndex&leaseRead特性,支持linearizable列存上借用类Parquet存储结构(LSM-Tree),同时在内存中增加一层 B+Tree,来改善读放大的问题HTAP混合负载TP场景:基于percolator实现乐观锁&悲观锁事务AP场景:RBO & CBO 的评估优化混合负

2021-08-25 08:35:06 885

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除