harmony 鸿蒙Distributed KV Store Error Codes
Distributed KV Store Error Codes
NOTE
This topic describes only module-specific error codes. For details about universal error codes, see Universal Error Codes.
15100001 Subscription Count Reaches the Limit
Error Message
Upper limit exceeded.
Description
The number of subscriptions or the number of opened result sets has reached the limit.
Possible Causes
- The number of subscriptions made through on() reaches 8.
- The number of result sets opened by getResultSet() reaches 8.
Solution
- Cancel the subscriptions that are not required.
- Close the result sets that are no longer required.
15100002 Parameter Configuration Changes
Error Message
The options configuration changes when the API is called to obtain a KV store.
Description
The options configuration changes when getKVStore() is called to obtain a KV store.
Possible Causes
The possible causes are as follows: 1. An existing storeId is used to create a KV store. 2. You want to change the options parameter of a KV store.
Solution
- When creating a KV store, do not use a duplicate storeId.
- Currently, the options parameter of a KV store cannot be changed. To apply the change, delete the KV store and create a KV store with the required options settings.
15100003 KV Store Corrupted
Error Message
Database corrupted.
Description
The target KV store is corrupted.
Possible Causes
The target KV store is corrupted.
Solution
- Restore the KV store from a backup file.
- If no backup file is available, delete the corrupted KV store and create a new one.
15100004 Failed to Find Data
Error Message
Data not found.
Description
Related data is not found when deleteKVStore(), sync(), or get() is called.
Possible Causes
The possible causes are as follows: 1. The KV store to delete does not exist or has been deleted. 2. The data queried does not exist or has been deleted. 3. The KV store specified for the data sync operation does not exist or has been deleted.
Solution
- Before deleting a KV store, check that the KV store exists.
- When querying data in a KV store, check whether the query keywords are correct.
- Before synchronizing data, check that the related KV store is available.
15100005 KV Store or Result Set Closed
Error Message
Database or result set already closed.
Description
The KV store or result set to operate is already closed.
Possible Causes
The KV store or result set is closed manually before the operation.
Solution
- Obtain the KV store and try again.
- Obtain the result set and try again.
15100006 Unable to Open the Database File
Error Message
Unable to open the database file.
Description
The database file cannot be accessed when getKVStore is called to open a KV store instance.
Possible Causes
- The caller does not have the permission to read or write the file.
- The disk space is insufficient for the file read or write operation.
Solution
- Check whether the database file path is correct and whether the caller has the permission to access the file.
- Check whether the disk space is sufficient.
你可能感兴趣的鸿蒙文章
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦