CentOS execution of grub2-mkconfig causes disk to be read-only

I recently encountered a failure where a disk partition was found to become read-only during a cluster software upgrade, causing the storage application to recognize the disk as unavailable. Investigation revealed that the cluster upgrade process regenerates the GRUB configuration file for each node, which causes the disk partition to become read-only during the execution of grub2-mkconfig. Document the flow of the grub2-mkconfig command execution until the real disk read-only command is issued.

Flink Window Mechanism

Windows is the core of processing wireless data streams, it splits the streams into buckets of finite size and performs various calculations on them. The structure of a windowed Flink program is usually as follows, with both grouped streams (keyed streams) and non-keyed streams (non-keyed streams). The difference between the two is that the grouped streams call the keyBy(...) method in grouped streams and windowAll(...) instead of the window(...) method in grouped streams.

Golang Common Design Patterns - Option Pattern

As any developer familiar with Python knows, Python has default parameters that allow us to optionally override certain default parameters as needed when instantiating an object to determine how to instantiate the object. This feature is great for elegantly simplifying code when an object has multiple default arguments. The Go language does not syntactically support default parameters, so in order to create objects both by default parameters and by passing custom parameters, we need to use some programming tricks to achieve this.

Build and debug openjdk 11 on win10

A long time ago, I wanted to compile the source code of java on windows, and recently I have been trying, and I have tried many methods and encountered many problems. Finally, I compile the process of difficulties and solutions encountered in the record, I hope to help those who come later. Download source code The source code of Openjdk 11 is stored on the URL https://hg.openjdk.java.net/jdk-updates/jdk11u/ and can be downloaded by clicking on the zip button on the left to download the source code zip file at the following address: https://hg.

Node.js dynamic table large file download practice

Recently optimized the performance bottleneck of the dynamic form file download interface written by several newcomers, it feels very necessary to summarize an article as a document to throw a brick to promote learning together to write a more professional code. Simple Download The simplest case is when a file already exists on the file system on the server, and the client requests a download, the file is read directly

Relationship eased, CCleaner now available in Windows 11 app store

The media Softpedia reports that the system cleaning tool CCleaner has been included in the new Microsoft Store for Windows 11. CCleaner is a system optimization and privacy protection tool designed to clean up junk files and users’ Internet history on Windows systems. It can clean up junk from temporary folders, history, recycle bin, registry, etc. In fact, the relationship between Microsoft and CCleaner had been strained for years before that.

Solo.io open source BumbleBee, use eBPF with a Docker-like experience

A few days ago, Solo.io announced on its official blog that it has open sourced a new project called BumbleBee. BumbleBee is focused on simplifying the user experience of building eBPF tools that help build, run and distribute eBPF programs using OCI images. Build, run and distribute eBPF programs. Docker-like experience Idit Levine, CEO of Solo.io, said, “At Solo.io, we see eBPF as a key supporting technology to improve application networking.

FlutterFragment use of Flutter mixed development

We know that there are two main ways to integrate Flutter with native Android. One is to create a flutter module, and then rely on it as a native module; the other is to package the flutter module into aar, and then rely on the aar package in the native project, which is officially recommended. aar way to access. 1. Android native engineering In Android native development, there are usually

Simple Binary Encoding

I. Preface In this article, let’s learn the SBE(Simple Binary Encoding) transfer protocol, which is the same as protobuf, which is a binary transport protocol with higher performance than protobuf, inspired by fast binary variant of FIX fix-simple-binary-encoding), and was originally intended for use in financial-grade, low-latency trading systems. SBE is also widely used as a data transfer medium in the open source software Aeron. II. Design Principles 2.1 Copy-Free

Control the number of concurrent goroutines

Concurrency overload causes program crashes Let’s start by looking at a very simple example. 1 2 3 4 5 6 7 8 9 10 11 12 func main() { var wg sync.WaitGroup for i := 0; i < math.MaxInt32; i++ { wg.Add(1) go func(i int) { defer wg.Done() fmt.Println(i) time.Sleep(time.Second) }(i) } wg.Wait() } This example implements concurrency of math.MaxInt32 concurrently, about 2^31 = 200 million, with each concurrently doing

Golang bytes performance comparison of two functions Compare, Equal

The bytes library in Go has two useful byte comparison functions: Compare, Equal bytes.Compare Compare is a comparison of the size of two [][]bytes, returning the value 0 : a == b -1 : a < b +1 : a > b bytes.Equal Equal directly determines whether the two are equal, a simple task, and definitely faster than Compare Performance comparison 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 var bs1 = [][]byte{ []byte("12a7.

Two efficient methods for generating combinations of Golang Slice and performance comparison

There are various ways to implement the Go language to generate a Slice with a specified number of combinations, here are two with better performance. The first two are specified to take the combination length, the first one is faster, the second one has simple code and slightly worse performance, and the third one is a full combination. The algorithm of the first one is implemented by Python’s itertools algorithm and is really fast.

AngularJS End of Life Cycle

AngularJS is a JavaScript-based open source front-end framework. It is mainly maintained by Google and a community of individuals and companies. AngularJS has reached end-of-life status (EOL) and will no longer receive any support or maintenance in the future. The Angular team hopes that existing users will migrate to the next generation of the TypeScript-based Angular framework. AngularJS was originally developed by Miško Hevery of Brat Tech LLC in 2009 and later acquired by Google.

Interpreting Go Language 2021: Stability is King

There seems to be a “two ends in one” phenomenon in the computing world. On the one hand, more and more computing needs are being moved to the cloud (i.e., the cloud computing side). If you are a practitioner, you should be used to “deploying programs to the cloud”; on the other hand, some terminals are becoming more and more intelligent. Some manufacturers have even built neural network engines (a

Interpreting Julia's 2021: Moving Toward a Mainstream Programming Language

In the past 2021, the Julia programming language community has continued to grow at a rapid pace. In addition, some of the world’s most prestigious universities, such as Peking University, MIT, Stanford and Berkeley, are already using Julia in their teaching. Here are a few dimensions to see how active the Julia programming language community is today. Over the past year, 1128 packages have been added to Julia’s default registry,

Electron application multiple open indexedDB open exception problem analysis and solution

Multiple application instances in electron will have indexedDB multiple open exceptions due to session sharing. Roughly, you will encounter an error like the following. 1 DOMException: Internal error opening backing store for indexedDB.open. When indexedDB is used in an application, this is a problem that will definitely be faced and needs to be solved. If it is not necessary, you can detect and disable multiple application sessions at startup. If

Node ORM framework Prisma Quick Start

Introduction Prisma is an open source, next-generation ORM that contains the following components. Prisma Client : auto-generated, type-safe query builder for Node.js and TypeScript Prisma Migrate : data migration system Prisma Studio : Graphical interface for querying and editing data in the database The Prisma client can be used in any Node.js or TypeScript backend application (including Serverless applications and microservices). It can be a REST API, a GraphQL API,

Go generic programming: interface is no longer the interface

Since Go 1.18 supported generics, the meaning of the Go interface has changed radically, and is used as a type constraint for generics in addition to the set of methods it previously represented. interface is no longer the simple interface it once was. In Go 1.17.x and previous versions, interface was defined as follows An interface type specifies a method set called its interface. A variable of interface type can

Using vue hooks in react

You may see the title and wonder: why do this? react hooks is a useful invention that reorganizes the paradigm of writing and thinking about code, using smaller abstractions to split state and functions by function rather than centralizing them into a single state or lifecycle. But react hooks suffers from the notion of state dependencies, and worse: it relies on manual management - despite the official eslint rules provided

Compile and install GCC12

Because I want to use C++20 standard, I need to use GCC12, but the default compiler of Ubuntu20 is GCC9, so I have to compile and install a GCC trunk by myself. I didn’t expect to have so many problems doing something that sounds so simple, so I’ll write a little bit of text to document it. Download source code 1 git clone https://github.com/gcc-mirror/gcc.git Configure dependencies 1 sudo apt install