不灭的火

革命尚未成功,同志仍须努力下载JDK17

作者:AlbertWen  添加时间:2014-08-04 22:50:00  修改时间:2025-06-06 12:47:42  分类:MySQL/Redis  编辑
作者:AlbertWen  添加时间:2015-01-05 14:08:05  修改时间:2025-05-22 19:14:38  分类:MySQL/Redis  编辑

场景

Mutex主要用于有大量并发访问并存在cache过期的场合,如

  • 首页top 10, 由数据库加载到memcache缓存n分钟;
  • 微博中名人的content cache, 一旦不存在会大量请求不能命中并加载数据库;
  • 需要执行多个IO操作生成的数据存在cache中, 比如查询db多次;

问题

在大并发的场合,当cache失效时,大量并发同时取不到cache,会同一瞬间去访问db并回设cache,可能会给系统带来潜在的超负荷风险。我们曾经在线上系统出现过类似故障。

作者:AlbertWen  添加时间:2014-08-04 11:07:25  修改时间:2025-07-06 18:09:03  分类:MySQL/Redis  编辑

作者:AlbertWen  添加时间:2017-10-27 19:54:54  修改时间:2025-07-08 17:59:02  分类:电脑/软件使用  编辑

1、解决 Gogland 不能调试 go 代码的问题

新建 Go 项目时,一定要通过 “File -> New -> Project...” 方式建立,,千万不要通过 “File -> Open”,即“直接打开现有文件夹” 的方式建立,否则,调试(Debug)功能失效,只有运行(Run)功能。

作者:AlbertWen  添加时间:2014-08-03 23:05:07  修改时间:2025-07-10 01:45:04  分类:MySQL/Redis  编辑

数据分布

1、MySQL Cluster自动分区数据表(也可能使用用户自定义分区),将数据分布到分区中

2、一个数据表被划分到多个Data Node分区中,数据在分区中被”striped

3、主键hashing 决定哪个分区拥有数据(自动分布)

4、对主键的一部分进行hashing也是可能的(适合sharding和数据局部性)

作者:AlbertWen  添加时间:2014-08-03 10:27:47  修改时间:2025-07-08 01:06:15  分类:Linux基础  编辑

1、查看物理CPU的个数

[root@MysqlCluster01 ~]# cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
1

2、查看逻辑CPU的个数

[root@MysqlCluster01 ~]# cat /proc/cpuinfo |grep "processor"|wc -l
4

作者:AlbertWen  添加时间:2019-03-21 14:15:18  修改时间:2025-07-10 03:44:41  分类:06.Linux软件安装  编辑
wenjianbao@wenjianbao-PC:~/Downloads/SecureCRT_8.3.4$ /usr/bin/SecureCRT
/usr/bin/SecureCRT: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
作者:AlbertWen  添加时间:2014-08-03 09:16:13  修改时间:2025-07-13 04:04:59  分类:Apache/Nginx  编辑

刚装完 PHP、Nginx,准备跑下 phpMyAdmin 程序,结果报以下错误:

An error occurred.

Sorry, the page you are looking for is currently unavailable.
Please try again later.

If you are the system administrator of this resource then you should check theerror log for details.

Faithfully yours, nginx.

作者:AlbertWen  添加时间:2014-11-10 15:10:19  修改时间:2025-06-13 18:56:03  分类:MySQL/Redis  编辑

作者:AlbertWen  添加时间:2014-07-30 21:08:36  修改时间:2025-05-22 19:15:01  分类:MySQL/Redis  编辑

Discuz X3/X2.5默认开启缩略图的时候水印只添加到原图上面,而缩略图上面无法进行水印图的添加,需要改下程序,方可给缩略图添加水印,需要修改2个地方:

1、打开 source\function\function_post.php

2、查找

$image->Watermark($_G['setting']['attachdir'].'/forum/'.$newattachfile[$aid], '', 'forum');