mysql8 從C++源碼角度看 Statement cancelled due to timeout or client request異常

##Statement cancelled due to timeout or client request 異常

Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client requestat com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1932)at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1251)at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3461)at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3459)at com.alibaba.druid.filter.FilterAdapter.preparedStatement_execute(FilterAdapter.java:1081)at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3459)at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3459)at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)at com.sun.proxy.$Proxy60.execute(Unknown Source)at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:63)at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)at org.apache.ibatis.executor.ReuseExecutor.doQuery(ReuseExecutor.java:60)at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:136)at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)at com.sun.proxy.$Proxy58.query(Unknown Source)at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)at com.sun.proxy.$Proxy58.query(Unknown Source)at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:136)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)

##5.1.48mysql驅動包 sql 語句超時設置

/*** Sets the queryTimeout limit* * @param seconds*            -*            the new query timeout limit in seconds* * @exception SQLException*                if a database access error occurs*/public void setQueryTimeout(int seconds) throws SQLException {synchronized (checkClosed().getConnectionMutex()) {if (seconds < 0) {throw SQLError.createSQLException(Messages.getString("Statement.21"), SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());}this.timeoutInMillis = seconds * 1000;}}

自定義的 CancelTask 類,它繼承自 TimerTask 類,用于在 Java 應用程序中取消 MySQL 數據庫中的查詢任務。這個類是 JDBC 驅動程序的一部分,用于處理查詢超時的情況。以下是代碼的主要功能和流程:

  1. 構造函數 (CancelTask(StatementImpl cancellee)):

    • 接收一個?StatementImpl?對象作為參數,這個對象代表需要被取消的 SQL 語句。
    • 復制連接的屬性到?origConnProps?屬性集合中。
    • 保存原始連接的 URL 和 ID。
  2. run 方法

    • 這個方法是?TimerTask?的核心,當定時器觸發時會調用此方法。
    • 創建一個新的線程?cancelThread?來執行取消操作,以避免阻塞定時器線程。
  3. cancelThread 線程

    • 在這個線程中,嘗試獲取物理連接?physicalConn
    • 如果連接支持超時后關閉(getQueryTimeoutKillsConnection()?返回?true),則標記 SQL 語句為已取消,并關閉連接。
    • 如果連接不支持,嘗試使用原始連接的屬性和 URL 重新建立連接,并執行?KILL QUERY?命令來取消查詢。
    • 如果在嘗試重新連接時捕獲到?NullPointerException,則忽略,因為這意味著連接已經關閉,查詢已經超時。
  4. 異常處理

    • 捕獲?SQLException?和?NullPointerException,并在?caughtWhileCancelling?變量中保存?SQLException
    • 在?finally?塊中,關閉?cancelStmt?和?cancelConn,并清理?CancelTask?對象的引用。

這個類的主要目的是在查詢超時時提供一個機制來取消正在執行的 SQL 查詢。這是 JDBC 驅動程序中的一個高級特性,允許應用程序在查詢執行時間過長時中斷查詢,以避免資源長時間占用。這種機制對于需要處理大量數據或執行復雜查詢的應用程序尤其重要,因為它可以幫助提高應用程序的響應性和資源利用率。

##執行查詢語句,設置超時任務timeoutTask = new CancelTask(this);

timeoutInMillis毫秒后,調度任務
? locallyScopedConn.getCancelTimer().schedule(timeoutTask, this.timeoutInMillis);

private boolean executeInternal(String sql, boolean returnGeneratedKeys) throws SQLException {MySQLConnection locallyScopedConn = checkClosed();synchronized (locallyScopedConn.getConnectionMutex()) {checkClosed();checkNullOrEmptyQuery(sql);resetCancelledState();implicitlyCloseAllOpenResults();if (sql.charAt(0) == '/') {if (sql.startsWith(PING_MARKER)) {doPingInstead();return true;}}char firstNonWsChar = StringUtils.firstAlphaCharUc(sql, findStartOfStatement(sql));boolean maybeSelect = firstNonWsChar == 'S';this.retrieveGeneratedKeys = returnGeneratedKeys;this.lastQueryIsOnDupKeyUpdate = returnGeneratedKeys && firstNonWsChar == 'I' && containsOnDuplicateKeyInString(sql);if (!maybeSelect && locallyScopedConn.isReadOnly()) {throw SQLError.createSQLException(Messages.getString("Statement.27") + Messages.getString("Statement.28"), SQLError.SQL_STATE_ILLEGAL_ARGUMENT,getExceptionInterceptor());}boolean readInfoMsgState = locallyScopedConn.isReadInfoMsgEnabled();if (returnGeneratedKeys && firstNonWsChar == 'R') {// If this is a 'REPLACE' query, we need to be able to parse the 'info' message returned from the server to determine the actual number of keys// generated.locallyScopedConn.setReadInfoMsgEnabled(true);}try {setupStreamingTimeout(locallyScopedConn);if (this.doEscapeProcessing) {Object escapedSqlResult = EscapeProcessor.escapeSQL(sql, locallyScopedConn.serverSupportsConvertFn(), locallyScopedConn);if (escapedSqlResult instanceof String) {sql = (String) escapedSqlResult;} else {sql = ((EscapeProcessorResult) escapedSqlResult).escapedSql;}}CachedResultSetMetaData cachedMetaData = null;ResultSetInternalMethods rs = null;this.batchedGeneratedKeys = null;if (useServerFetch()) {rs = createResultSetUsingServerFetch(sql);} else {CancelTask timeoutTask = null;String oldCatalog = null;try {if (locallyScopedConn.getEnableQueryTimeouts() && this.timeoutInMillis != 0 && locallyScopedConn.versionMeetsMinimum(5, 0, 0)) {timeoutTask = new CancelTask(this);locallyScopedConn.getCancelTimer().schedule(timeoutTask, this.timeoutInMillis);}if (!locallyScopedConn.getCatalog().equals(this.currentCatalog)) {oldCatalog = locallyScopedConn.getCatalog();locallyScopedConn.setCatalog(this.currentCatalog);}//// Check if we have cached metadata for this query...//Field[] cachedFields = null;if (locallyScopedConn.getCacheResultSetMetadata()) {cachedMetaData = locallyScopedConn.getCachedMetaData(sql);if (cachedMetaData != null) {cachedFields = cachedMetaData.fields;}}//// Only apply max_rows to selects//locallyScopedConn.setSessionMaxRows(maybeSelect ? this.maxRows : -1);statementBegins();rs = locallyScopedConn.execSQL(this, sql, this.maxRows, null, this.resultSetType, this.resultSetConcurrency, createStreamingResultSet(),this.currentCatalog, cachedFields);if (timeoutTask != null) {if (timeoutTask.caughtWhileCancelling != null) {throw timeoutTask.caughtWhileCancelling;}timeoutTask.cancel();timeoutTask = null;}synchronized (this.cancelTimeoutMutex) {if (this.wasCancelled) {SQLException cause = null;if (this.wasCancelledByTimeout) {cause = new MySQLTimeoutException();} else {cause = new MySQLStatementCancelledException();}resetCancelledState();throw cause;}}} finally {if (timeoutTask != null) {timeoutTask.cancel();locallyScopedConn.getCancelTimer().purge();}if (oldCatalog != null) {locallyScopedConn.setCatalog(oldCatalog);}}}if (rs != null) {this.lastInsertId = rs.getUpdateID();this.results = rs;rs.setFirstCharOfQuery(firstNonWsChar);if (rs.reallyResult()) {if (cachedMetaData != null) {locallyScopedConn.initializeResultsMetadataFromCache(sql, cachedMetaData, this.results);} else {if (this.connection.getCacheResultSetMetadata()) {locallyScopedConn.initializeResultsMetadataFromCache(sql, null /* will be created */, this.results);}}}}return ((rs != null) && rs.reallyResult());} finally {locallyScopedConn.setReadInfoMsgEnabled(readInfoMsgState);this.statementExecuting.set(false);}}}

##發送?cancelStmt.execute("KILL QUERY " + physicalConn.getId());??給mysql服務端

class CancelTask extends TimerTask {SQLException caughtWhileCancelling = null;StatementImpl toCancel;Properties origConnProps = null;String origConnURL = "";long origConnId = 0;CancelTask(StatementImpl cancellee) throws SQLException {this.toCancel = cancellee;this.origConnProps = new Properties();Properties props = StatementImpl.this.connection.getProperties();Enumeration<?> keys = props.propertyNames();while (keys.hasMoreElements()) {String key = keys.nextElement().toString();this.origConnProps.setProperty(key, props.getProperty(key));}this.origConnURL = StatementImpl.this.connection.getURL();this.origConnId = StatementImpl.this.connection.getId();}@Overridepublic void run() {Thread cancelThread = new Thread() {@Overridepublic void run() {Connection cancelConn = null;java.sql.Statement cancelStmt = null;try {MySQLConnection physicalConn = StatementImpl.this.physicalConnection.get();if (physicalConn != null) {if (physicalConn.getQueryTimeoutKillsConnection()) {CancelTask.this.toCancel.wasCancelled = true;CancelTask.this.toCancel.wasCancelledByTimeout = true;physicalConn.realClose(false, false, true,new MySQLStatementCancelledException(Messages.getString("Statement.ConnectionKilledDueToTimeout")));} else {synchronized (StatementImpl.this.cancelTimeoutMutex) {if (CancelTask.this.origConnURL.equals(physicalConn.getURL())) {// All's finecancelConn = physicalConn.duplicate();cancelStmt = cancelConn.createStatement();cancelStmt.execute("KILL QUERY " + physicalConn.getId());} else {try {cancelConn = (Connection) DriverManager.getConnection(CancelTask.this.origConnURL, CancelTask.this.origConnProps);cancelStmt = cancelConn.createStatement();cancelStmt.execute("KILL QUERY " + CancelTask.this.origConnId);} catch (NullPointerException npe) {// Log this? "Failed to connect to " + origConnURL + " and KILL query"}}CancelTask.this.toCancel.wasCancelled = true;CancelTask.this.toCancel.wasCancelledByTimeout = true;}}}} catch (SQLException sqlEx) {CancelTask.this.caughtWhileCancelling = sqlEx;} catch (NullPointerException npe) {// Case when connection closed while starting to cancel.// We can't easily synchronize this, because then one thread can't cancel() a running query.// Ignore, we shouldn't re-throw this, because the connection's already closed, so the statement has been timed out.} finally {if (cancelStmt != null) {try {cancelStmt.close();} catch (SQLException sqlEx) {throw new RuntimeException(sqlEx.toString());}}if (cancelConn != null) {try {cancelConn.close();} catch (SQLException sqlEx) {throw new RuntimeException(sqlEx.toString());}}CancelTask.this.toCancel = null;CancelTask.this.origConnProps = null;CancelTask.this.origConnURL = null;}}};cancelThread.start();}}

##mysql8處理KILL QUERY C++源碼

THD 類的 awake 方法,并向其傳遞了一個參數,這個參數決定了是只殺死查詢(THD::KILL_QUERY)還是關閉整個連接(THD::KILL_CONNECTION)。awake 方法的作用是發送一個信號給目標線程,使其停止當前正在執行的操作。

  • 如果?only_kill_query?參數為?true,則傳遞?THD::KILL_QUERY,這會導致目標線程停止當前的查詢操作。
  • 如果?only_kill_query?參數為?false,則傳遞?THD::KILL_CONNECTION,這會導致目標線程關閉整個連接,包括所有查詢。

這個方法是線程間通信的一種方式,用于安全地中斷另一個線程的執行。在 MySQL 服務器中,這是處理 KILL 命令的核心部分,允許管理員或有權限的用戶終止長時間運行的查詢或釋放資源。

/**kill on thread.@param thd			Thread class@param id			Thread id@param only_kill_query        Should it kill the query or the connection@noteThis is written such that we have a short lock on LOCK_thd_list
*/static uint kill_one_thread(THD *thd, my_thread_id id, bool only_kill_query) {uint error = ER_NO_SUCH_THREAD;Find_thd_with_id find_thd_with_id(id);DBUG_TRACE;DBUG_PRINT("enter", ("id=%u only_kill=%d", id, only_kill_query));DEBUG_SYNC(thd, "kill_thd_begin");THD_ptr tmp = Global_THD_manager::get_instance()->find_thd(&find_thd_with_id);Security_context *sctx = thd->security_context();if (tmp) {/*If we're SUPER, we can KILL anything, including system-threads.No further checks.KILLer: thd->m_security_ctx->user could in theory be NULL whilewe're still in "unauthenticated" state. This is a theoreticalcase (the code suggests this could happen, so we play it safe).KILLee: tmp->m_security_ctx->user will be NULL for system threads.We need to check so Jane Random User doesn't crash the serverwhen trying to kill a) system threads or b) unauthenticated users'threads (Bug#43748).If user of both killer and killee are non-NULL, proceed withslayage if both are string-equal.*/if (sctx->check_access(SUPER_ACL) ||sctx->has_global_grant(STRING_WITH_LEN("CONNECTION_ADMIN")).first ||sctx->user_matches(tmp->security_context())) {/*Process the kill:if thread is not already undergoing any kill connection.Killer must have SYSTEM_USER privilege iff killee has the same privilegeprivilege*/if (tmp->killed != THD::KILL_CONNECTION) {if (tmp->is_system_user() && !thd->is_system_user()) {error = ER_KILL_DENIED_ERROR;} else {tmp->awake(only_kill_query ? THD::KILL_QUERY : THD::KILL_CONNECTION);error = 0;}} elseerror = 0;} elseerror = ER_KILL_DENIED_ERROR;}DEBUG_SYNC(thd, "kill_thd_end");DBUG_PRINT("exit", ("%d", error));return error;
}/*kills a thread and sends responseSYNOPSISsql_kill()thd			Thread classid			Thread idonly_kill_query     Should it kill the query or the connection
*/static void sql_kill(THD *thd, my_thread_id id, bool only_kill_query) {uint error;if (!(error = kill_one_thread(thd, id, only_kill_query))) {if (!thd->killed) my_ok(thd);} elsemy_error(error, MYF(0), id);
}

##gdb調用棧

(gdb) b sql_kill
#0  kill_one_thread (thd=0x73e42003e450, id=444, only_kill_query=true) at /home/yym/mysql8/mysql-8.1.0/sql/sql_parse.cc:6518
#1  0x00006040ed8ae76a in sql_kill (thd=0x73e42003e450, id=444, only_kill_query=true) at /home/yym/mysql8/mysql-8.1.0/sql/sql_parse.cc:6582
#2  0x00006040ed8a71e1 in mysql_execute_command (thd=0x73e42003e450, first_level=true) at /home/yym/mysql8/mysql-8.1.0/sql/sql_parse.cc:4306
#3  0x00006040ed8aacb3 in dispatch_sql_command (thd=0x73e42003e450, parser_state=0x73e5594f79f0) at /home/yym/mysql8/mysql-8.1.0/sql/sql_parse.cc:5447
#4  0x00006040ed8a00d7 in dispatch_command (thd=0x73e42003e450, com_data=0x73e5594f8340, command=COM_QUERY) at /home/yym/mysql8/mysql-8.1.0/sql/sql_parse.cc:2112
#5  0x00006040ed89df77 in do_command (thd=0x73e42003e450) at /home/yym/mysql8/mysql-8.1.0/sql/sql_parse.cc:1459
#6  0x00006040edaf5835 in handle_connection (arg=0x6040f65a0060) at /home/yym/mysql8/mysql-8.1.0/sql/conn_handler/connection_handler_per_thread.cc:303
#7  0x00006040efa34bdc in pfs_spawn_thread (arg=0x6040f66eb480) at /home/yym/mysql8/mysql-8.1.0/storage/perfschema/pfs.cc:3043
#8  0x000073e569094ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x000073e569126850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/64652.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/64652.shtml
英文地址,請注明出處:http://en.pswp.cn/web/64652.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

【數據結構-單調隊列】力扣1438. 絕對差不超過限制的最長連續子數組

給你一個整數數組 nums &#xff0c;和一個表示限制的整數 limit&#xff0c;請你返回最長連續子數組的長度&#xff0c;該子數組中的任意兩個元素之間的絕對差必須小于或者等于 limit 。 如果不存在滿足條件的子數組&#xff0c;則返回 0 。 示例 1&#xff1a; 輸入&#x…

SAP HCM 標準報表與前臺操作的增強差異邏輯分析(rhgrenz4)

導讀 增強差異:SAP的HCM模塊組織和人事增強都有標準的增強點&#xff0c;不管你調用標準的函數還是前臺操作都會觸發對應的增強。所以很多業務不需要考慮那么多分散點&#xff0c;只要找到一個合適的增強點&#xff0c;就能解決很多和外圍系統集成的業務邏輯&#xff0c;今天遇…

【Spring】Spring DI(依賴注入)詳解——自動裝配——手動裝配與自動裝配的區別

在spring開發中&#xff0c;依賴注入&#xff08;Dependency Injection&#xff0c;DI&#xff09;是實現松耦合和高內聚設計的重要模式。它使得對象的創建和管理與其依賴關系分離&#xff0c;從而提高了代碼的可維護性、可測試性和靈活性。Spring框架通過IoC&#xff08;控制反…

EZ-USB? FX3 USB 5 Gbps 外設控制器

EZ-USB? FX3 USB 5 Gbps 外設控制器 EZ-USB? FX3 提供 USB 5Gbps 至 32 位數據總線&#xff0c;并配備 ARM9&#xff0c;可為任何系統添加 USB 3.0 連接 英飛凌的 EZ-USB? FX3 是業界用途最廣泛的 USB 外圍設備控制器&#xff0c;可以為幾乎任何系統添加 USB 5Gbps 連接。 …

【數據倉庫】spark大數據處理框架

文章目錄 概述架構spark 架構角色下載安裝啟動pyspark啟動spark-sehll啟動spark-sqlspark-submit經驗 概述 Spark是一個性能優異的集群計算框架&#xff0c;廣泛應用于大數據領域。類似Hadoop&#xff0c;但對Hadoop做了優化&#xff0c;計算任務的中間結果可以存儲在內存中&a…

數據庫容災備份的意義+分類+執行工具!

數據庫容災解決方案的背景 數據庫容災&#xff08;Disaster Recovery&#xff0c;DR&#xff09;解決方案的背景主要源于企業對數據安全性、業務連續性和系統高可用性的需求。隨著數字化轉型的加速&#xff0c;企業的數據量迅猛增長&#xff0c;數據庫已成為支撐核心業務的關鍵…

PDF怎么壓縮得又小又清晰?5種PDF壓縮方法

PDF 文件在日常辦公與學習中使用極為頻繁&#xff0c;可想要把它壓縮得又小又清晰卻困難重重。一方面&#xff0c;PDF 格式本身具有高度兼容性&#xff0c;集成了文字、圖像、矢量圖等多樣元素&#xff0c;壓縮時難以兼顧不同元素特性&#xff0c;稍不注意&#xff0c;文字就會…

SpringBoot數據字典字段自動生成對應code和desc

效果&#xff1a;接口會返回orderType&#xff0c;但是這個orderType是枚舉的類型&#xff08;1&#xff0c;2&#xff0c;3&#xff0c;4&#xff09;&#xff0c;我想多返回一個orderTypeDesc給前端展示&#xff0c;這樣前端就可以直接拿orderTypeDesc使用了。 1. 定義注解 …

【YashanDB知識庫】imp導入數據庫時,報錯YAS-08023

本文內容來自YashanDB官網&#xff0c;原文內容請見 https://www.yashandb.com/newsinfo/7849010.html?templateId1718516 **【問題分類】**數據導入導出 **【關鍵字】**imp、YAS-08023 【問題描述】 導出數據庫時&#xff0c;使用以下命令&#xff0c;導出正常&#xff1…

又一年。。。。。。

2024&#xff0c;渾渾噩噩的一年。 除了100以內的加減法&#xff08;數據&#xff0c;數據&#xff0c;還是數據。。。。。。&#xff09;&#xff0c;似乎沒做些什么。 臉盲癥越來越重的&#xff0c;怕是哪天連自己都不認得自己的了。 看到什么&#xff0c;聽到什…

FreeRTOS: ISR(中斷服務例程)和 TCB(任務控制塊)

在討論 ISR&#xff08;中斷服務例程&#xff09;和 TCB&#xff08;任務控制塊&#xff0c;Task Control Block&#xff09;時&#xff0c;我們實際上是在探討 FreeRTOS 中兩個不同但又相互關聯的概念&#xff1a;一個是用于處理硬件或軟件觸發的中斷事件&#xff0c;另一個是…

GoldenDB組件及對應的用戶和進程

1. GoldenDB組件及對應的用戶和進程 GoldenDB數據庫由管理節點、全局事務節點GTM、計算節點CN、數據節點DN等組成。 1.1. 管理節點 管理節點分為集群管理、Insight運維管理平臺&#xff08;InsightServer、RDB、ZK&#xff09;。 1.1.1. 集群管理 1. 集群管理包括Metadatas…

OpenStack系列第四篇:云平臺基礎功能與操作(Dashboard)

文章目錄 1. 鏡像&#xff08;Image&#xff09;添加鏡像查看鏡像刪除鏡像 2. 卷&#xff08;Volume&#xff09;創建卷查看卷刪除卷 3. 網絡&#xff08;虛擬網絡&#xff09;創建網絡查看網絡刪除網絡 4. 實例類型創建實例類型查看實例類型刪除實例類型 4. 密鑰對&#xff08…

CSDN編輯器

這里寫自定義目錄標題 歡迎使用Markdown編輯器新的改變功能快捷鍵合理的創建標題&#xff0c;有助于目錄的生成如何改變文本的樣式插入鏈接與圖片如何插入一段漂亮的代碼片生成一個適合你的列表創建一個表格設定內容居中、居左、居右SmartyPants 創建一個自定義列表如何創建一個…

MTK 平臺關于WIFI 6E P2P的解說

一 前言 官方 P2P 6E 設計原理,請查看這個網站 hostap - hostapd/wpa_supplicant 配置:p2p_6ghz_disable 允許上層指定是否允許6G連接 僅允許6G用于WFD –不允許6G用于純P2P 缺點:存在很多 IOT issues 如:一些物聯網設備無法識別6G類/信道,可能存在物聯網問…

四大自平衡樹對比:AVL樹、紅黑樹、B樹與B+樹

AVL樹、紅黑樹、B樹和B樹的對比與應用場景 樹系列相關文章&#xff08;置頂&#xff09; 1、從鏈表到平衡樹&#xff1a;二叉查找樹的退化與優化 2、自平衡二叉查找樹&#xff1a;如何讓二叉查找樹始終保持高效 3、AVL樹入門&#xff1a;理解自平衡二叉查找樹的基礎 4、紅黑樹全…

Linux下讀取Windows下保存的文件,報錯信息中出現“^M“時如何解決?【由于Windows和Linux的換行方式不同造成的-提供兩種轉換方式】

Windows 和 Linux 的文本文件使用的換行符不同&#xff1a; Windows 使用 \r\n &#xff08;回車 換行&#xff09;。Linux 使用 \n &#xff08;換行&#xff09;。 因此&#xff0c;當在 Linux 系統上運行帶有 Windows 換行符的腳本或讀取相關文件時&#xff0c;可能會出現…

簡易內存池(下)

提示&#xff1a;文章 文章目錄 前言一、背景二、2.1Ace代碼 三、3.1 總結 前言 前期疑問&#xff1a; 本文目標&#xff1a; 一、背景 最近 二、 2.1 Ace代碼 Aced代碼形式如下 #include <stdbool.h> #include <stdio.h> #include <malloc.h> #inclu…

npm ERR! ECONNRESET 解決方法

問題&#xff1a;npm 命令遇到的錯誤是 ECONNRESET&#xff0c;這通常與網絡連接問題相關。設置代理解決問題。 一、查看當前代理設置 npm config get proxy npm config get https-proxy二、設置代理 npm config set proxy http://your-proxy-address:port npm config set h…

【UE5】UnrealEngine源碼構建2:windows構建unreal engine 5.3.2

參考大神知乎的文章:UE5 小白也能看懂的源碼編譯指南 據說會耗費400G的空間。 代碼本身并不大,可能是依賴特別多,畢竟看起來UE啥都能干,核心還是c++的, 【UE5】UnrealEngine源碼構建1:tag為5.3.2源碼clone 本著好奇+ 學習的態度,想著也許有機會能更為深入的熟悉UE的機制…