[20190312]關於增量檢查點的疑問(補充).txt

来源:https://www.cnblogs.com/lfree/archive/2019/03/14/10528283.html
-Advertisement-
Play Games

[20190312]關於增量檢查點的疑問(補充).txt--//有人問我以前寫一個帖子的問題,關於增量檢查點的問題,鏈接如下:http://blog.itpub.net/267265/viewspace-2136817/--//實際上我自己看以前寫的帖子一下子有點蒙,主要出現low_rba16=0x ...


[20190312]關於增量檢查點的疑問(補充).txt

--//有人問我以前寫一個帖子的問題,關於增量檢查點的問題,鏈接如下:http://blog.itpub.net/267265/viewspace-2136817/
--//實際上我自己看以前寫的帖子一下子有點蒙,主要出現low_rba16=0xffffffff.ffffffff.ffff,為什麼恢復的起點是on_disk_rba16.
--//先簡單說明一下:
--//oracle現在寫臟塊基本採用增量檢查點,即使日誌切換,實際上執行也是增量檢查點,除非執行alter system checkpoint,或者
--//shutdown immediate(normal)正常關閉資料庫,如果異常關閉資料庫,啟動時執行崩潰恢復(crash recovery),恢復起點從low_rba.
--//先驗證這樣的情況:

1.環境:
SCOTT@book> @ ver1
PORT_STRING         VERSION        BANNER
------------------- -------------- ----------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

--//寫一個腳本check.sql,以前寫的太複雜,簡單一點:
--// x$kccrt 記錄全檢查點
--// x$kcccp 記錄增量檢查點

$ cat check.sql
column "full checkpoint_rba" format a21
column low_rba format a20
column low_rba16 format a20
column on_disk_rba format a20
column on_disk_rba16 format a20
column rtckp_rba format a20
column diff_date format 9999999.99
rem column CPOSD_ono_disk_rba_scn format 99999999999999999999999999999999
column cpdrt heading "檢查點隊列|臟塊數量|CPDRT"
column cpodt_on_disk_rba heading "檢查點隊列|on disk rba|時間戳|CPODT"
column cpods heading "檢查點隊列|on disk rba scn|CPODS"
column cphbt heading "檢查點心跳|CPHBT"
column current_sysdate heading "當前時間|SYSDATE"
set num 12

SELECT b.cplrba_seq || '.' || b.cplrba_bno || '.' || b.cplrba_bof "low_rba"
      ,b.cpodr_seq || '.' || b.cpodr_bno || '.' || b.cpodr_bof "on_disk_rba"
      ,b.CPODS "on_disk_rba_scn(CPODS)"
      ,TO_DATE (b.CPODT, 'MM-DD-YYYY HH24:MI:SS') "on_disk_rba_time(CPODT)"
      ,a.rtckp_rba_seq || '.' || a.rtckp_rba_bno || '.' || a.rtckp_rba_bof
          "full checkpoint_rba"
      ,a.rtckp_scn "full_checkpoint(rtckp_scn)"
      ,TO_DATE (a.rtckp_tim, 'MM-DD-YYYY HH24:MI:SS')
          "full_checkpoint_time_rtckp_tim"
      ,b.CPODS - a.rtckp_scn "diff_scn(on_disk_rdb-ch_scn)"
      ,a.rtcln "current_group"
      ,sysdate current_sysdate
      ,CPDRT
  FROM x$kccrt a, x$kcccp b
 WHERE a.rtnum = b.cptno AND A.INST_ID = b.inst_id;

2.測試:
SYS@book> shutdown  abort ;
ORACLE instance shut down.

SYS@book> startup mount
ORACLE instance started.
Total System Global Area    643084288 bytes
Fixed Size                    2255872 bytes
Variable Size               205521920 bytes
Database Buffers            427819008 bytes
Redo Buffers                  7487488 bytes
Database mounted.

SYS@book> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/oracle/archivelog/book/
Oldest online log sequence     787
Next log sequence to archive   789
Current log sequence           789

SYS@book> @ check
                                                                                                                                                                                         檢查點隊列
                                                                                                                                                                   當前時間                臟塊數量
low_rba     on_disk_rba on_disk_rba_scn( on_disk_rba_time(CP full checkpoint_rba   full_checkpoint( full_checkpoint_tim diff_scn(on_disk_rdb-ch_scn) current_group SYSDATE                    CPDRT
----------- ----------- ---------------- ------------------- --------------------- ---------------- ------------------- ---------------------------- ------------- ------------------- ------------
789.5775.0  789.5955.0  13278979623      2019-03-12 11:20:53 789.1890.16           13278977341      2019-03-12 10:52:50                         2282             2 2019-03-12 11:21:42           12

--//看看日誌應用的起點是否從low_rba開始.

SYS@book> alter database open ;
Database altered.

--//查看alert.log日誌:
Beginning crash recovery of 1 threads
 parallel recovery started with 23 processes
Started redo scan
Completed redo scan
 read 90 KB redo, 12 data blocks need recovery
Started redo application at
 Thread 1: logseq 789, block 5775
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=>起點對應low_rba=789.5775.0
Recovery of Online Redo Log: Thread 1 Group 2 Seq 789 Reading mem 0
  Mem# 0: /mnt/ramdisk/book/redo02.log
Completed redo application of 0.00MB
Completed crash recovery at
 Thread 1: logseq 789, block 5956, scn 13278999624
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=>結束對應on_disk_rba=789.5955.0加1個塊(512位元組redo),scn號對應on_disk_rba_scn+1.
 12 data blocks read, 12 data blocks written, 90 redo k-bytes read
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--//5955-5775 = 180,應用日誌180塊,日誌文件每塊512位元組.
--//180*512/1024 = 90k,這些正好對上.
Tue Mar 12 11:23:26 2019
LGWR: STARTING ARCH PROCESSES
Tue Mar 12 11:23:26 2019
ARC0 started with pid=45, OS id=56804
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Thread 1 advanced to log sequence 790 (thread open)
Thread 1 opened at log sequence 790
--//日誌切換使用新日誌.
  Current log# 3 seq# 790 mem# 0: /mnt/ramdisk/book/redo03.log
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Tue Mar 12 11:23:27 2019
SMON: enabling cache recovery

--//也就是異常關閉後,crash recovery的起點從low_rba到on_disk_rba,完成後scn號+1,日誌塊號加1.日誌切換使用新日誌.

3.如果low_rba16=0xffffffff.ffffffff.ffff呢?

SYS@book> alter system checkpoint ;
System altered.

SYS@book> @ check
                                                                                                                                                                                                           檢查點隊列
                                                                                                                                                                                     當前時間                臟塊數量
low_rba              on_disk_rba          on_disk_rba_scn( on_disk_rba_time(CP full checkpoint_rba   full_checkpoint( full_checkpoint_tim diff_scn(on_disk_rdb-ch_scn) current_group SYSDATE                    CPDRT
-------------------- -------------------- ---------------- ------------------- --------------------- ---------------- ------------------- ---------------------------- ------------- ------------------- ------------
4294967295.429496729 790.659.0            13279000486      2019-03-12 11:32:34 790.658.16            13279000485      2019-03-12 11:32:33                            1             3 2019-03-12 11:32:35            0
5.65535

--//等一會執行:
SYS@book> @ check
                                                                                                                                                                                                           檢查點隊列
                                                                                                                                                                                     當前時間                臟塊數量
low_rba              on_disk_rba          on_disk_rba_scn( on_disk_rba_time(CP full checkpoint_rba   full_checkpoint( full_checkpoint_tim diff_scn(on_disk_rdb-ch_scn) current_group SYSDATE                    CPDRT
-------------------- -------------------- ---------------- ------------------- --------------------- ---------------- ------------------- ---------------------------- ------------- ------------------- ------------
4294967295.429496729 790.678.0            13279000505      2019-03-12 11:32:53 790.658.16            13279000485      2019-03-12 11:32:33                           20             3 2019-03-12 11:32:54            0
5.65535


--//你可以發現alter system checkpoint 後,如果沒有事務low_rba16=0xffffffff.ffffffff.ffff,而on_disk_rba一直在增加.而CPDRT=0.
--//似乎11g不知道為什麼在"空轉"(沒有事務產生的情況下)的情況,日誌也在不斷增加,不知道為什麼?

SYS@book> shutdown  abort ;
ORACLE instance shut down.

SYS@book> startup mount
ORACLE instance started.
Total System Global Area    643084288 bytes
Fixed Size                    2255872 bytes
Variable Size               205521920 bytes
Database Buffers            427819008 bytes
Redo Buffers                  7487488 bytes
Database mounted.

SYS@book> @ check
                                                                                                                                                                                                           檢查點隊列
                                                                                                                                                                                     當前時間                臟塊數量
low_rba              on_disk_rba          on_disk_rba_scn( on_disk_rba_time(CP full checkpoint_rba   full_checkpoint( full_checkpoint_tim diff_scn(on_disk_rdb-ch_scn) current_group SYSDATE                    CPDRT
-------------------- -------------------- ---------------- ------------------- --------------------- ---------------- ------------------- ---------------------------- ------------- ------------------- ------------
4294967295.429496729 790.705.0            13279000532      2019-03-12 11:33:20 790.658.16            13279000485      2019-03-12 11:32:33                           47             3 2019-03-12 11:36:09            0
5.65535

--//可以發現這個時候low_rba16=0xffffffff.ffffffff.ffff,這個時候恢復的起點從那裡開始,實際上從on_disk_rba開始,或者講根本沒
--//有恢復,CPDRT=0也是佐證,雖然當時on_disk_rba還在不斷增加.

SYS@book> alter database open ;
Database altered.

--//查看alert.log:
Beginning crash recovery of 1 threads
 parallel recovery started with 23 processes
Started redo scan
Completed redo scan
 read 0 KB redo, 0 data blocks need recovery
Started redo application at
 Thread 1: logseq 790, block 705, scn 13279000532
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=>起點對應on_disk_rba=790.705.0
Recovery of Online Redo Log: Thread 1 Group 3 Seq 790 Reading mem 0
  Mem# 0: /mnt/ramdisk/book/redo03.log
Completed redo application of 0.00MB
Completed crash recovery at
 Thread 1: logseq 790, block 706, scn 13279020533
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=>結束對應on_disk_rba=790.705.0加1個塊(512位元組redo),scn號對應on_disk_rba_scn+1.
 0 data blocks read, 0 data blocks written, 0 redo k-bytes read
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> 日誌應用0K.
Tue Mar 12 11:39:33 2019
LGWR: STARTING ARCH PROCESSES
Tue Mar 12 11:39:33 2019
ARC0 started with pid=45, OS id=56980
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Thread 1 advanced to log sequence 791 (thread open)
Thread 1 opened at log sequence 791
--//日誌切換使用新日誌.
  Current log# 1 seq# 791 mem# 0: /mnt/ramdisk/book/redo01.log
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Tue Mar 12 11:39:34 2019
SMON: enabling cache recovery

4.我在原鏈接寫一個腳本:
SCOTT@book> create table t1 as select * from all_objects ;
Table created.

$ cat a.sql
alter system checkpoint;
alter system checkpoint;
alter system checkpoint;
@ check
update scott.t1 set object_name=object_name where rownum=1 ;
commit;
host sleep 3
@ check


SYS@book> @ a.sql
System altered.
System altered.
System altered.
                                                                                                                                                                                                           檢查點隊列
                                                                                                                                                                                     當前時間                臟塊數量
low_rba              on_disk_rba          on_disk_rba_scn( on_disk_rba_time(CP full checkpoint_rba   full_checkpoint( full_checkpoint_tim diff_scn(on_disk_rdb-ch_scn) current_group SYSDATE                    CPDRT
-------------------- -------------------- ---------------- ------------------- --------------------- ---------------- ------------------- ---------------------------- ------------- ------------------- ------------
4294967295.429496729 791.21362.0          13279021797      2019-03-12 11:52:59 791.21362.16          13279021800      2019-03-12 11:53:00                           -3             1 2019-03-12 11:53:01            0
5.65535
1 row updated.
Commit complete.
                                                                                                                                                                                                           檢查點隊列
                                                                                                                                                                                     當前時間                臟塊數量
low_rba              on_disk_rba          on_disk_rba_scn( on_disk_rba_time(CP full checkpoint_rba   full_checkpoint( full_checkpoint_tim diff_scn(on_disk_rdb-ch_scn) current_group SYSDATE                    CPDRT
-------------------- -------------------- ---------------- ------------------- --------------------- ---------------- ------------------- ---------------------------- ------------- ------------------- ------------
791.21363.0          791.21366.0          13279021805      2019-03-12 11:53:02 791.21362.16          13279021800      2019-03-12 11:53:00                            5             1 2019-03-12 11:53:04            3

--//註意看發生事務前後的low_rba,on_disk_rba.不好描述,自己看.^_^.
--//一旦有事務產生,你可以發現low_rba不再是4294967295.4294967295.65535.
--//很奇怪不知道為什麼11g下在沒有事務的情況下會"空轉",這樣11g的日誌即使是很空閑的資料庫日誌增加也會比10g大.

5.看看10g的情況:
[email protected]:1521/test> @ ver1

PORT_STRING                    VERSION        BANNER
------------------------------ -------------- ----------------------------------------------------------------
x86_64/Linux 2.4.xx            10.2.0.4.0     Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi

[email protected]:1521/test> alter system checkpoint ;
System altered.

[email protected]:1521/test> @ check
                                                                                                                                                                                                           檢查點隊列
                                                                                                                                                                                     當前時間                臟塊數量
low_rba              on_disk_rba          on_disk_rba_scn( on_disk_rba_time(CP full checkpoint_rba   full_checkpoint( full_checkpoint_tim diff_scn(on_disk_rdb-ch_scn) current_group SYSDATE                    CPDRT
-------------------- -------------------- ---------------- ------------------- --------------------- ---------------- ------------------- ---------------------------- ------------- ------------------- ------------
4294967295.429496729 1497.42866.0         14987614992      2019-03-12 11:55:37 1497.42866.16         14987615031      2019-03-12 11:57:34                          -39             3 2019-03-12 11:57:35            0
5.65535


[email protected]:1521/test> @ check
                                                                                                                                                                                                           檢查點隊列
                                                                                                                                                                                     當前時間                臟塊數量
low_rba              on_disk_rba          on_disk_rba_scn( on_disk_rba_time(CP full checkpoint_rba   full_checkpoint( full_checkpoint_tim diff_scn(on_disk_rdb-ch_scn) current_group SYSDATE                    CPDRT
-------------------- -------------------- ---------------- ------------------- --------------------- ---------------- ------------------- ---------------------------- ------------- ------------------- ------------
4294967295.429496729 1497.42866.0         14987614992      2019-03-12 11:55:37 1497.42866.16         14987615031      2019-03-12 11:57:34                          -39             3 2019-03-12 11:58:29            0
5.65535

--//註意看執行時間2019-03-12 11:57:35 -2019-03-12 11:58:29 之間,沒有任何事務產生,on_disk_rba根本不變化.這樣10g日誌產生量
--//明顯比11g小.

6.我改上面的腳本check.sql:
--//最後加入host sleep 1.執行如下:

$ rlsql -s -l sys/oracle as sysdba <<EOF
> $(seq 100| xargs -I{} cat /home/oracle/sqllaji/check.sql)
> EOF

                                                                                                                                                                                                           檢查點隊列
                                                                                                                                                                                     當前時間                臟塊數量
low_rba              on_disk_rba          on_disk_rba_scn( on_disk_rba_time(CP full checkpoint_rba   full_checkpoint( full_checkpoint_tim diff_scn(on_disk_rdb-ch_scn) current_group SYSDATE                    CPDRT
-------------------- -------------------- ---------------- ------------------- --------------------- ---------------- ------------------- ---------------------------- ------------- ------------------- ------------
791.24582.0          791.24711.0          13279023352      2019-03-12 12:11:39 791.21362.16          13279021800      2019-03-12 11:53:00                         1552             1 2019-03-12 12:11:41            8


                                                                                                                                                                                                           檢查點隊列
                                                                                                                                                                                     當前時間                臟塊數量
low_rba              on_disk_rba          on_disk_rba_scn( on_disk_rba_time(CP full checkpoint_rba   full_checkpoint( full_checkpoint_tim diff_scn(on_disk_rdb-ch_scn) current_group SYSDATE                    CPDRT
-------------------- -------------------- ---------------- ------------------- --------------------- ---------------- ------------------- ---------------------------- ------------- ------------------- ------------
791.24582.0          791.24712.0          13279023353      2019-03-12 12:11:40 791.21362.16          13279021800      2019-03-12 11:53:00                         1553             1 2019-03-12 12:11:42            8


                                                                                                                                                                                                           檢查點隊列
                                                                                                                                                                                     當前時間                臟塊數量
low_rba              on_disk_rba          on_disk_rba_scn( on_disk_rba_time(CP full checkpoint_rba   full_checkpoint( full_checkpoint_tim diff_scn(on_disk_rdb-ch_scn) current_group SYSDATE                    CPDRT
-------------------- -------------------- ---------------- ------------------- --------------------- ---------------- ------------------- ---------------------------- ------------- ------------------- ------------
791.24582.0          791.24713.0          13279023354      2019-03-12 12:11:41 791.21362.16          13279021800      2019-03-12 11:53:00                         1554             1 2019-03-12 12:11:43            8

--//在沒有事務的情況下.每秒scn增加1,日誌塊增加1,是否更我訪問這些記憶體"表"有關,換1個方式測試,取消check.sql後面的host sleep 1,建立腳本b.sql:
$ cat b.sql
@ check.sql
host sleep 30
@ check.sql


SYS@book> @ b.sql

                                                                                                                                                                                                           檢查點隊列
                                                                                                                                                                                     當前時間                臟塊數量
low_rba              on_disk_rba          on_disk_rba_scn( on_disk_rba_time(CP full checkpoint_rba   full_checkpoint( full_checkpoint_tim diff_scn(on_disk_rdb-ch_scn) current_group SYSDATE                    CPDRT
-------------------- -------------------- ---------------- ------------------- --------------------- ---------------- ------------------- ---------------------------- ------------- ------------------- ------------
791.24582.0          791.24852.0          13279023481      2019-03-12 12:13:41 791.21362.16          13279021800      2019-03-12 11:53:00                         1681             1 2019-03-12 12:13:43           19


                                                                                                                                                                                                           檢查點隊列
                                                                                                                                                                                     當前時間                臟塊數量
low_rba              on_disk_rba          on_disk_rba_scn( on_disk_rba_time(CP full checkpoint_rba   full_checkpoint( full_checkpoint_tim diff_scn(on_disk_rdb-ch_scn) current_group SYSDATE                    CPDRT
-------------------- -------------------- ---------------- ------------------- --------------------- ---------------- ------------------- ---------------------------- ------------- ------------------- ------------
791.24582.0          791.24882.0          13279023511      2019-03-12 12:14:11 791.21362.16          13279021800      2019-03-12 11:53:00                         1711             1 2019-03-12 12:14:13           19

--//確實每秒scn增加1,on_disk_rba也是增加每秒1塊.


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • Centos6.5安裝MySQL5.6 1. 查看系統狀態 2.創建需要下載rpm軟體包的目錄 3. 查看系統中是否有已經存在的MySQL 如果有需要卸載 用這個查找 用這個卸載 4. 下載MySQL 5.6安裝包 分別執行下麵的三條命令 如果下載的速度太慢,也可以使用window下載後傳輸到虛擬機 ...
  • 使用redis已幾年有餘,之前寫過Redis關於master-slave(主從)同步原理的文章。這裡介紹下安裝過程,因為前前後後有些命令也記不住了,所以此篇文章和之前文章一樣起個備註記錄作用,也供屏幕前的你參考。如果喜歡麻煩點贊 -_- 環境: 說明: 個人比較喜歡yum安裝(rpm包安裝),因為比 ...
  • SELECT name, type_desc FROM sys.all_sql_modules s INNER JOIN sys.all_objects o ON s.object_id = o.object_id WHERE definition LIKE '%關鍵字%' ORDER BY typ... ...
  • 1、查看Oracle當前版本 如圖所示: 2、切換到Oracle用戶 如圖所示: 3、進入sqlplus(此時尚未登錄oracle) 如圖所示: 4、以管理員登錄Oracle 如圖所示: 5、查看當前用戶 如圖所示: 6、查看資料庫當前模式 如圖所示: 7、立即關閉Oracle 如圖所示: 講解: ...
  • 一:資料庫的操作語言的種類 MySQL 是我們最常使用的關係型資料庫,對於MySQL的操作的語言種類又可以分為:DDL,DML,DCL,DQL 二:對於資料庫的常用命令 1)命令視窗進行登錄 2)命令視窗修改登錄密碼 3)根據IP進行遠程連接MySQL 4)對於資料庫信息相關操作 5)建表語句 6) ...
  • 具體步驟: 1.nginx下載 2.在G:\nginx-1.15.8\conf/nginx.conf改三處路徑:nginx.conf 文件中配置的路徑和埠要映射到vue項目工程 a.改 映射埠: #設定實際的伺服器列表 upstream zp_server1{ server 127.0.0.1: ...
  • Rollup與group by組合使用,可對分組結果進行進一步的彙總。 創建數據表 (1) rollup單個欄位 如按照country欄位進行分組,併在最後追加一條彙總所有country的值 (2) rollup多個欄位 按照gender,country欄位進行分組,並針對每一個country追加一 ...
  • 一、首先生成一個日期表,執行SQL如下: 二、按天統計所需數據SQL如下: 以上統計數據可根據自身統計需求修改。 三、執行效果如下圖: ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...