Ceph rgw CephContext的属性_service_thread
来源:互联网 发布:js调用麦克风录音 编辑:程序博客网 时间:2024/05/20 07:15
CephContext的_service_thread属性
CephContext代表这进程的上下文,该实例中几乎包含进程的所有信息。这里主要介绍他的_service_thread属性。
_service_thread代表着一个线程,主要用来完成重新打开log file和更新performance counter;GIGHUP会唤醒该线程。其主要逻辑如下:
void *entry() { while (1) { Mutex::Locker l(_lock);//heartbeat_interval==5 if (_cct->_conf->heartbeat_interval) { utime_t interval(_cct->_conf->heartbeat_interval, 0); _cond.WaitInterval(_cct, _lock, interval); //wait interval time } else _cond.Wait(_lock); if (_exit_thread) { break; } if (_reopen_logs) { _cct->_log->reopen_log_file(); _reopen_logs = false; } _cct->_heartbeat_map->check_touch_file(); // refresh the perf coutners _cct->refresh_perf_values(); } return NULL; }
下面是重新打开日志文件的过程:
void Log::reopen_log_file(){ pthread_mutex_lock(&m_flush_mutex); m_flush_mutex_holder = pthread_self(); if (m_fd >= 0) VOID_TEMP_FAILURE_RETRY(::close(m_fd)); if (m_log_file.length()) { m_fd = ::open(m_log_file.c_str(), O_CREAT|O_WRONLY|O_APPEND, 0644); } else { m_fd = -1; } m_flush_mutex_holder = 0; pthread_mutex_unlock(&m_flush_mutex);}
0 0
- Ceph rgw CephContext的属性_service_thread
- Ceph rgw CephContext _log属性
- ceph rgw CephContext的_admin_socket属性及功能扩展模式
- ceph-deploy的rgw命令
- ceph rgw中所使用的池子
- Ceph RGW Federated Architecture
- CEPH RGW 使用
- 【分析】Ceph:RGW基本原理
- 【实践】Ceph:创建RGW
- Ceph+RGW部署方案
- 三种Ceph rgw前端的配置方式
- Ceph对象存储(rgw)的IPv6环境配置
- S3 client 访问ceph rgw
- CEPH RGW处理请求过程
- ceph rgw中的md_config_obs_t类
- ceph rgw md_config_t(SubsystemMap/subsystem)
- Ceph rgw 一Region多zone配置
- Ceph部署(二)RGW搭建
- 66,Xcode API文档阅读
- Android-View-绘制
- javascript 自定义Array对象
- UEFI启动视频详解:启动分析+N项操作实例
- Python爬虫实战一之爬取糗事百科段子
- Ceph rgw CephContext的属性_service_thread
- Avro技术应用_9. 基于记录 - MR 输入/出/中间数据使用 Avro 类型 -- 待完善
- 用K-均值聚类来探索顾客细分
- servlet(简单应用,500和404错误)
- ORACLE基本数据类型总结
- springMvc 学习及使用约定
- C++:int转string
- Avro技术应用_10. 基于键值 - 在 MR 中把文本文件(csv)转换成键值对格式的 Avro 文件 -- 待完善
- 12.5周报