1# ArkData Changelog 2 3## cl.kv_store.1 Change in the Error Code Returned by getKVStore() 4 5**Access Level** 6 7Public API 8 9**Reason for the Change** 10 11The error code returned is changed from **15100003** to **15100006** when the database file cannot be accessed due to the device being locked. 12 13**Change Impact** 14 15This change is a non-compatible change. 16 17Before the change:<br>The attempt to access files in the **/el2**, **/el3**, or **/el4** directory when the device is not unlocked will trigger error 15100003 Database corrupted. 18 19After the change:<br>The attempt to access files in the **/el2**, **/el3**, or **/el4** directory when the device is not unlocked will trigger error 15100006 Unable to open the database file. 20 21**Start API Level** 22 239 24 25**Change Since** 26 27OpenHarmony SDK 5.0.0.51 28 29**Key API/Component Changes** 30 31**getKVStore()** of distributedKVStore 32 33**Adaptation Guide** 34 35Files in the **/el2**, **/el3**, or **/el4** directory cannot be accessed when the device is locked. Calling **getKVStore()** will return error 15100006 Unable to open the database file when the device is locked. This error code does not affect applications. You can determine whether to capture this error code. If this error code is captured, the service can access the database file at appropriate time, for example, when the device is unlocked. 36 37## cl.kv_store.2 Change in the Error Code Returned by backup() and restore() 38 39**Access Level** 40 41Public API 42 43**Reason for the Change** 44 45Due to an implementation bug, calling **backup()** will trigger a successful backup operation even when the database file is corrupted, generating a backup of the corrupted file. 46 47Due to an implementation bug, calling **restore()** will trigger a successful restore operation even when the database file is corrupted, resulting in a corrupted file. 48 49**Change Impact** 50 51This change is a non-compatible change. 52 53Before the change:<br>Calling **backup()** will trigger a successful backup operation even when the database file is corrupted, generating a backup of the corrupted file. Calling **restore()** will trigger a successful restore operation even when the database file is corrupted, resulting in a corrupted file. 54 55Before the change:<br>If the database file is corrupted, calling **backup()** or **restore()** will return error 15100003 Database corrupted. 56 57**Start API Level** 58 599 60 61**Change Since** 62 63OpenHarmony SDK 5.0.0.51 64 65**Key API/Component Changes** 66 67**backup()** and **restore()** of distributedKVStore 68 69**Adaptation Guide** 70 71If the database file is corrupted, calling **backup()** will return error 15100003 Database corrupted. The backup operation fails, and the service should proceed based on the error code. 72 73If the database file is corrupted, calling **restore()** will return error 15100003 Database corrupted. The restore operation fails, and the service should regenerate data and write the data to the database file. 74