<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[很多时候，你缺少的不是知识而是热情]]></title><description><![CDATA[MYSQL，NOSQL，架构，大数据]]></description><link>https://blog.csdn.net/xtjsxtj</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; xtjsxtj]]></copyright><item><title><![CDATA[ES节点服务器异常掉电重启导致shard不能启动的问题修复]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/79997666</link><guid>https://blog.csdn.net/xtjsxtj/article/details/79997666</guid><author>xtjsxtj</author><pubDate>Wed, 18 Apr 2018 22:04:03 +0800</pubDate><description><![CDATA[今天elasticsearch两个节点服务器异常掉电重启，遇到translog损坏的异常，将修复的过程记录下来。



1、问题

单机数据量有2亿+，一个index，20+个字段，使用bulk不停的写数据，bulk.size=5000，此时机器意外断电宕机。

机器修复后重启ES，出现translogCorruptedException异常：



[2018-04-18 16:29:25,95...]]></description><category></category></item><item><title><![CDATA[elasticsearch出现TranslogCorruptedException导致shard不能启动的问题修复]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/79997292</link><guid>https://blog.csdn.net/xtjsxtj/article/details/79997292</guid><author>xtjsxtj</author><pubDate>Wed, 18 Apr 2018 21:38:23 +0800</pubDate><description><![CDATA[测试elasticsearch过程中，遇到translog损坏的异常，将修复的过程记录下来。

1. 问题

单机数据量有8亿+，一个index，20+个字段，使用bulk不停的写数据，bulk.size=5W，此时机器意外断电宕机。

机器修复后重启ES，出现translogCorruptedException异常：





[plain] view
 plain c]]></description><category></category></item><item><title><![CDATA[追踪同步分片副本]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/78518303</link><guid>https://blog.csdn.net/xtjsxtj/article/details/78518303</guid><author>xtjsxtj</author><pubDate>Mon, 13 Nov 2017 11:07:57 +0800</pubDate><description><![CDATA[转自： easyice.cn

周末抽空翻译了官网一篇关于 allocation id 的文章，这对理解 ES5之后主分片选举策略至关重要。

原文链接

elasticsearch 通过在集群中保留多个数据副本的方式提供故障转移功能，当出现网络分区或者节点挂掉时，更改操作可能无法在所有副本上完成。这篇博客展示了 elasticsearch 的内部机制之一，如何把未产生更改的 shar]]></description><category></category></item><item><title><![CDATA[将 ELASTICSEARCH 写入速度优化到极限]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/78518209</link><guid>https://blog.csdn.net/xtjsxtj/article/details/78518209</guid><author>xtjsxtj</author><pubDate>Mon, 13 Nov 2017 11:02:48 +0800</pubDate><description><![CDATA[转自：https://www.easyice.cn/archives/207目录 [隐藏]translog flush 间隔调整索引刷新间隔调整: refresh_intervalrefresh_intervalsegment mergeIndexing Bufferbulk 线程池和队列大小磁盘间的任务均衡节点间的任务均衡索引过程调整和优化自动生成 doc ID调整字段 Mappings调整_s...]]></description><category></category></item><item><title><![CDATA[Elasticsearch优秀的索引设置技巧]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/78487659</link><guid>https://blog.csdn.net/xtjsxtj/article/details/78487659</guid><author>xtjsxtj</author><pubDate>Thu, 09 Nov 2017 11:25:48 +0800</pubDate><description><![CDATA[下面的索引设置是从国外一家优秀的图片搜索公司获取,可以从其设置索引的设计上得到一些如何提高索引设计技巧的方式：{
  "500px.photos-2016-05-06-20-09": {
    "aliases": {
      "500px.photos": {}
    },
    "mappings": {
      "photo": {
        "_all": {]]></description><category></category></item><item><title><![CDATA[用 logstash 解析 json 数组]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/78415194</link><guid>https://blog.csdn.net/xtjsxtj/article/details/78415194</guid><author>xtjsxtj</author><pubDate>Wed, 01 Nov 2017 16:06:43 +0800</pubDate><description><![CDATA[原始输入日志文件每行日志格式如下，json 数组格式的： 
[{“a”:1},{“a”:2}]要求拆分成2行事件，在ES中保存两个文档 
{“a”:1} 
{“a”:2}本来以为挺麻烦，原来 input -> codec => json 直接支持解析这种格式，真愚昧啊    file {
        type => "test"
        path => "/home/jfy/tmp/te]]></description><category></category></item><item><title><![CDATA[修改 mysql-binlog 二进制日志文件至其它目录]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/78366621</link><guid>https://blog.csdn.net/xtjsxtj/article/details/78366621</guid><author>xtjsxtj</author><pubDate>Fri, 27 Oct 2017 16:44:40 +0800</pubDate><description><![CDATA[myql默认配置情况下，二进制日志文件是保存在默认的数据目录 data 下，如:/usr/local/mysql/data。 
有时我们希望把 binlog 修改保存到其他目录下，现记录下操作过程。 
假设原目录为: /usr/local/mysql/data，并且已有一些日志文件 mysql-bin.?????? 
新目录为: /data/mysql/datamysql.server stopvi]]></description><category></category></item><item><title><![CDATA[Elasticsearch集群冷热分离-实际操作]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/78354327</link><guid>https://blog.csdn.net/xtjsxtj/article/details/78354327</guid><author>xtjsxtj</author><pubDate>Thu, 26 Oct 2017 15:22:52 +0800</pubDate><description><![CDATA[这次冷热分离将4个节点，分别2个为一组，分别叫做 cold & hot，hot 组两个节点，cold 组两个节点节点级别配置在 hot 组的两个节点的 elasticsearch.yml 配置文件 Node 配置段中增加node.tag: hot在 cold 组的两个节点的 elasticsearch.yml 配置文件 Node 配置段中增加node.tag: cold索引级别配置为了让新建的的索引]]></description><category></category></item><item><title><![CDATA[mysql在线无性能影响删除7G大表]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/77569905</link><guid>https://blog.csdn.net/xtjsxtj/article/details/77569905</guid><author>xtjsxtj</author><pubDate>Fri, 25 Aug 2017 11:46:45 +0800</pubDate><description><![CDATA[如何在mysql数据库里删除7G(或更大)大表，使其又不影响服务器的io，导致性能下降影响业务。先不说其是mysql表，就是普通文件，如果直接rm删除，也会使服务器的io性能急剧下降；换个思路如果用化整为零的方式，分多次大大文件一点一点删除，就可以避免因删除文件占用太多服务器io资源

例子：

版本：
mysql> select version();
+------------+
]]></description><category></category></item><item><title><![CDATA[MySQL/InnoDB处理AUTO_INCREMENT（二）]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/74130902</link><guid>https://blog.csdn.net/xtjsxtj/article/details/74130902</guid><author>xtjsxtj</author><pubDate>Sun, 02 Jul 2017 16:42:50 +0800</pubDate><description><![CDATA[Configurable InnoDB Auto-Increment Locking
As described in the previous section, InnoDB uses a special lock called the table-level AUTO-INC lock for inserts into tables with AUTO_INCREMENT columns. T]]></description><category></category></item><item><title><![CDATA[MySQL/InnoDB处理AUTO_INCREMENT（一）]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/74129914</link><guid>https://blog.csdn.net/xtjsxtj/article/details/74129914</guid><author>xtjsxtj</author><pubDate>Sun, 02 Jul 2017 16:39:04 +0800</pubDate><description><![CDATA[http://dev.mysql.com/doc/refman/5.6/en/innodb-auto-increment-handling.html


AUTO_INCREMENT Handling in InnoDB
下面所使用的表
CREATE TABLE people  (
    person_id BIGINT NOT NULL AUTO_INCREMENT,
    fir]]></description><category></category></item><item><title><![CDATA[MySQL auto_increment实现]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/74129895</link><guid>https://blog.csdn.net/xtjsxtj/article/details/74129895</guid><author>xtjsxtj</author><pubDate>Sun, 02 Jul 2017 16:32:11 +0800</pubDate><description><![CDATA[运维的时候，经常遇到auto_increment的疑惑：

机器异常crash，重启后id回退的问题性能考虑，每次获取肯定不会持久化，内存中取值，statement复制如何保证主备一致id的取值受binlog的保护吗

1. auto_increment相关的参数控制

1.1 innodb_autoinc_lock_mode

0: 每一个statement获取一个排他lock，]]></description><category></category></item><item><title><![CDATA[MySQL 命令行工具之 mysqldump 深入研究]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/62217603</link><guid>https://blog.csdn.net/xtjsxtj/article/details/62217603</guid><author>xtjsxtj</author><pubDate>Wed, 15 Mar 2017 11:13:18 +0800</pubDate><description><![CDATA[原文链接：
http://www.cnblogs.com/digdeep/p/4898622.html
http://www.cnblogs.com/digdeep/p/4906032.html





mysqldump 是MySQL的一个命令行工具，用于逻辑备份。可以将数据库和表的结构，以及表中的数据分别导出成：create database, create table, i]]></description><category></category></item><item><title><![CDATA[使用 xtrabackup 进行MySQL数据库物理备份]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/62217386</link><guid>https://blog.csdn.net/xtjsxtj/article/details/62217386</guid><author>xtjsxtj</author><pubDate>Wed, 15 Mar 2017 11:04:02 +0800</pubDate><description><![CDATA[原文链接：http://www.cnblogs.com/digdeep/p/4946230.html




0. xtrabackup的功能

能实现的功能：

非阻塞备份innodb等事务引擎数据库、

备份myisam表会阻塞(需要锁)、

支持全备、增量备份、压缩备份、

快速增量备份(xtradb，原理类似于oracle：tracking 上次备份之后发生修]]></description><category></category></item><item><title><![CDATA[深入理解mysqldump原理 --single-transaction --lock-all-tables --master-data]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/62039347</link><guid>https://blog.csdn.net/xtjsxtj/article/details/62039347</guid><author>xtjsxtj</author><pubDate>Tue, 14 Mar 2017 11:15:20 +0800</pubDate><description><![CDATA[原文链接：http://blog.csdn.net/cug_jiang126com/article/details/49824471



在mysqldump过程中，之前其实一直不是很理解为什么加了--single-transaction就能保证innodb的数据是完全一致的，而myisam引擎无法保证，必须加--lock-all-tables，前段时间抽空详细地查看了整个mysqldu]]></description><category></category></item><item><title><![CDATA[MySQL 一致性读 深入研究]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/62039106</link><guid>https://blog.csdn.net/xtjsxtj/article/details/62039106</guid><author>xtjsxtj</author><pubDate>Tue, 14 Mar 2017 11:05:39 +0800</pubDate><description><![CDATA[原文链接：http://www.cnblogs.com/digdeep/p/4947694.html




一致性读，又称为快照读。使用的是MVCC机制读取undo中的已经提交的数据。所以它的读取是非阻塞的。

相关文档：http://dev.mysql.com/doc/refman/5.6/en/innodb-consistent-read.html

A consisten]]></description><category></category></item><item><title><![CDATA[一次mysql slave故障的解决过程]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/60574336</link><guid>https://blog.csdn.net/xtjsxtj/article/details/60574336</guid><author>xtjsxtj</author><pubDate>Mon, 06 Mar 2017 13:07:24 +0800</pubDate><description><![CDATA[mysql> show slave status\G 
Last_SQL_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master’s binary log is corrupted (you can check this by running]]></description><category></category></item><item><title><![CDATA[MySQL闪回原理与实战]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/55094821</link><guid>https://blog.csdn.net/xtjsxtj/article/details/55094821</guid><author>xtjsxtj</author><pubDate>Tue, 14 Feb 2017 09:29:31 +0800</pubDate><description><![CDATA[MySQL闪回原理与实战原文地址： 
https://github.com/danfengcao/binlog2sql/blob/master/example/mysql-flashback-priciple-and-practice.md 
https://github.com/danfengcao/binlog2sqlDBA或开发人员，有时会误删或者误更新数据，如果是线上环境并且影响较大，就需要]]></description><category></category></item><item><title><![CDATA[binlog2sql]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/55094784</link><guid>https://blog.csdn.net/xtjsxtj/article/details/55094784</guid><author>xtjsxtj</author><pubDate>Tue, 14 Feb 2017 09:26:18 +0800</pubDate><description><![CDATA[binlog2sql原文地址：https://github.com/danfengcao/binlog2sql从MySQL binlog解析出你要的SQL。根据不同选项，你可以得到原始SQL、回滚SQL、去除主键的INSERT SQL等。用途
数据快速回滚(闪回)
主从切换后数据不一致的修复
从binlog生成标准SQL，带来的衍生功能
项目状态正常维护。应用于大众点评线上环境。线上环境的操作，请在]]></description><category></category></item><item><title><![CDATA[缓存更新的套路]]></title><link>https://blog.csdn.net/xtjsxtj/article/details/52316348</link><guid>https://blog.csdn.net/xtjsxtj/article/details/52316348</guid><author>xtjsxtj</author><pubDate>Thu, 25 Aug 2016 17:05:54 +0800</pubDate><description><![CDATA[原文地址：http://coolshell.cn/articles/17416.html




看到好些人在写更新缓存数据代码时，先删除缓存，然后再更新数据库，而后续的操作会把数据再装载的缓存中。然而，这个是逻辑是错误的。试想，两个并发操作，一个是更新操作，另一个是查询操作，更新操作删除缓存后，查询操作没有命中缓存，先把老数据读出来后放到缓存中，然后更新操作更新了数据库。于是，在缓存中]]></description><category></category></item></channel></rss>