Redis Cache Penetration, Breakdown, and Avalanche: Solutions and Strategies
Cache Penetration
Concept
Cache penetration occurs when querying data that does not exist in the database. The typical cache flow works as follows: data retrieval first checks the cache. If the key does not exist or has expired, the query proceeds to the database, and the retrieved object is stored in the cache. If the database returns null, th ...
Posted on Tue, 28 Jul 2026 16:47:57 +0000 by onegative
ElasticSearch Fundamentals
Introduction to ElasticSearch
Data base Query Challenges
Performance Issues: Wildcard searches (e.g., leading %) prevent index usage, leading to full table scans.
Limited Functionality: Unable to query compound terms like "Huawei phone" effectively.
Inverted Index
An inverted index maps terms to document IDs. For example:
Forward i ...
Posted on Tue, 28 Jul 2026 16:07:07 +0000 by tskweb
MySQL Storage Engines and InnoDB Core Features
Storage engines serve as the underlying architecture managing data storage, retrieval, and transactional integrity in MySQL. Key capabilities include:
Data read/write operations
Ensuring data security and consistency
Performance optimization
Hot backup support
Automatic crash recovery
High availability features
Common Storage Engines
MySQL su ...
Posted on Mon, 27 Jul 2026 16:40:30 +0000 by johncal
Spark SQL DROP Statements Reference
DROP DATABASE
Description
Removes a database and its associated directory from the file system. An exception is thrown if the database does not exist.
Syntax
DROP { DATABASE | SCHEMA } [ IF EXISTS ] db_name [ RESTRICT | CASCADE ]
Parameters
DATABASE | SCHEMA
These keywords are interchangeable. Either can be used to refer to the database obje ...
Posted on Mon, 27 Jul 2026 16:36:06 +0000 by lpxxfaintxx
Setting Up a Three-Node MongoDB Replica Set on CentOS 7
Installl MongoDB
Create a custom YUM repository:
sudo tee /etc/yum.repos.d/mongodb.repo <<EOF
[mongodb-org]
name=MongoDB Repository
baseurl=https://mirrors.aliyun.com/mongodb/yum/redhat/7/mongodb-org/4.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc
EOF
Install the MongoDB package:
sudo yum install ...
Posted on Sun, 26 Jul 2026 16:04:57 +0000 by mherr170
Resolving MySQL Host Access Denied Error via Permission Bypass
Identifying the Connection IssueWhen setting up a fresh MySQL instance on a test server, connection attempts may fail with the following error:ERROR 1130 (HY000): Host 'node-01' is not allowed to connect to this MySQL serverThis indicates that the server's host-based access control does not permit connections from the specific hostname. Since c ...
Posted on Fri, 24 Jul 2026 16:24:53 +0000 by delmardata
Connecting PHP to MySQL Database and Basic Operations
Connecting PHP to MySQL Dataabse
<?php
$serverName = "localhost";
$userName = "root";
$password = "root";
$databaseName = "mysql";
// Create connection
$connection = new mysqli($serverName, $userName, $password, $databaseName);
// Check connection
if ($connection->connect_error) {
die("Co ...
Posted on Thu, 23 Jul 2026 16:06:47 +0000 by ErnesTo
Setting Up MySQL Master-Master Replication in Docker Containers
This guide assumes familiarity with basic MySQL replication concepts and focuses exclusively on configuring a master-master replication setup using Docker containers. For master-slave replication, refer to other resources.
Understanding Master-Master Replication
In traditional master-slave replication, writes are restricted to the master to avo ...
Posted on Tue, 21 Jul 2026 16:28:44 +0000 by pluginbaby
Handling Multiple Parameter Types in MyBatis Mapper Methods
MyBatis supports various ways to pass parameters to mapper methods, depending on the type and number of arguments. Below are common scenarios with corresponding interface definitions, XML mappings, and usage patterns.
Mapper Interface
package com.msb.mapper;
import com.msb.pojo.Emp;
import org.apache.ibatis.annotations.Param;
import java.util. ...
Posted on Mon, 20 Jul 2026 17:37:26 +0000 by bnmng
Essential MySQL Commands Reference
1.1 Database and Table Operations
Data Definition Language is used for defining database structures
1.1.1 Database Operations
Display all databases: SHOW DATABASES;
Display database creation details: SHOW CREATE DATABASE database_name;
Create a database: CREATE DATABASE database_name;
Create database with existence check: CREATE DATABASE IF NO ...
Posted on Mon, 20 Jul 2026 16:42:45 +0000 by ibechane