IP Library › Granted Patent US 12,399,862
Granted Patent B2
US 12,399,862 · App. 18/107,424 · Granted Aug 26, 2025

Method for recovering database file in electronic device

Inventors: Yoonho Shin (Suwon-si, KR); Kisung Lee (Suwon-si, KR); Hyeeun Jun (Suwon-si, KR); Hobin Woo (Suwon-si, KR)
Assignee: SAMSUNG ELECTRONICS CO., LTD.
G06F16/122G06F11/1469G06F16/1774G06F2201/80G06F2201/84
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,399,862
App. No.
18/107,424
Granted
Aug 26, 2025
Kind
B2
Abstract

According to an embodiment, an electronic device includes a memory including a database file and at least one processor connected to the memory. The at least one processor may identify damage to the database file while a first application running on the electronic device accesses the database file. The at least one processor may control a second application running on the electronic device to wait without accessing the database file until recovery of the damaged database file is completed. The at least one processor may record recovery state information indicating that the database file is recovered if the recovery of the damaged database file is completed. The at least one processor may control the second application to access the recovered database file based on the recovery state information.

Claims (55)

1. An electronic device comprising:

at least one processor including processing circuitry; and

memory including one or more storage mediums storing instructions that, when executed by the at least one processor individually or collectively, cause the electronic device to:

receive a request from a first application running on the electronic device to open a database file, wherein the database file is stored in the memory,

identify that the database file is damaged as a damaged database file responsive to the first application running on the electronic device requesting to open the database file,

set a file lock on the damaged database file to indicate that the database file is being recovered,

identify a second application running on the electronic device that wants to access the damaged database file while recovering the database file,

based on the file lock, identify that the database file is being recovered and control the second application to wait without accessing the damaged database file until recovery of the damaged database file is completed,

record recovery state information indicating that the damaged database file is recovered as a recovered database file based on identifying that the recovery of the damaged database file is completed,

release the file lock for the database file based on the recovery of the damaged database file succeeding and after completion of recording the recovery state information, and

control the second application to access the recovered database file based on the recovery state information, wherein the recovered database file is accessible by the first application.

2. The electronic device of claim 1 , wherein the instructions, when executed by the processing circuitry individually or collectively, cause the electronic device to recover the damaged database file using the first application accessing on the database file.

3. The electronic device of claim 1 , wherein the file lock is an exclusive lock uniquely set for the database file.

4. The electronic device of claim 1 ,

wherein based on the recovery state information being set to a first value, the first value indicates that the damaged database file is recovered, and

based on the recovery state information being set to a second value, the second value indicates that the damaged database file is not recovered.

5. The electronic device of claim 1 , wherein the recovery state information is implemented as a user defined attribute included in metadata for the database file.

6. The electronic device of claim 5 , wherein the user defined attribute is set as an extended attribute of an index node of a file system.

7. The electronic device of claim 1 , wherein the recovery state information is implemented as a table included in the recovered database file.

8. The electronic device of claim 1 ,

wherein the database file is constituted of a plurality of pages, and

wherein the recovery state information is included in a first page in the database file.

9. The electronic device of claim 1 ,

wherein the at least one processor includes a database library, and

wherein the database library is set to include a first logic for identifying a recovery operation for the damaged database file and a second logic for identifying a recovery state for the damaged database file.

10. A method for operating an electronic device, the method comprising:

receiving a request from a first application running on the electronic device to open a database file, wherein the database file is stored in memory of the electronic device;

identifying, by at least one processor of the electronic device executing a plurality of instructions stored in a memory of the electronic device, that the database file is damaged as a damaged database file responsive to a first application running on the electronic device requesting to open the database file;

setting a file lock on the damaged database file to indicate that the database file is being recovered;

identifying a second application running on the electronic device that wants to access the damaged database file while recovering the database file;

based on the lock, identifying that the database file is being recovered and controlling, by the at least one processor of the electronic device, the second application to wait without accessing the damaged database file until recovery of the damaged database file is completed;

recording, by the at least one processor of the electronic device, recovery state information indicating that the damaged database file is recovered as a recovered database file based on identifying that the recovery of the damaged database file is completed;

releasing the file lock for the database file based on the recovery of the damaged database file succeeding and after completion of recording the recovery state information; and

controlling, by the at least one processor of the electronic device, the second application to access the recovered database file based on the recovery state information, wherein the recovered database file is accessible by the first application.

11. The method of claim 10 , further comprising:

recovering, by the at least one processor, the damaged database file using the first application accessing on the database file.

12. The method of claim 10 , wherein the file lock is an exclusive lock uniquely set for the database file.

13. The method of claim 10 ,

wherein based on the recovery state information being set to a first value, the first value indicates that the damaged database file is recovered, and

based on the recovery state information being set to a second value, the second value indicates that the damaged database file is not recovered.

14. The method of claim 10 , wherein the recovery state information is implemented as a user defined attribute included in metadata for the database file.

15. The method of claim 14 , wherein the user defined attribute is set as an extended attribute of an index node of a file system.

16. The method of claim 10 , wherein the recovery state information is implemented as a table included in the recovered database file.

17. The method of claim 10 ,

wherein the database file is constituted of a plurality of pages, and

wherein the recovery state information is included in a first page in the database file.

18. A computer program product comprising a non-transitory storage medium storing instructions that, when executed by at least one processor of an electronic device individually or collectively, cause the electronic device to perform a plurality of operations, the plurality of operations comprising:

receiving a request from a first application running on the electronic device to open a database file, wherein the database file is stored in memory of the electronic device;

identifying that the database file stored in a memory of the electronic device is damaged as a damaged database file responsive to a first application running on the electronic device requesting to open the database file;

setting a file lock on the damaged database file to indicate that the database file is being recovered;

identifying a second application running on the electronic device that wants to access the damaged database file while recovering the database file;

based on the lock, identifying that the database file is being recovered and controlling the second application to wait without accessing the damaged database file until recovery of the damaged database file is completed;

recording recovery state information in the electronic device indicating that the damaged database file is recovered as a recovered database file based on identifying that the recovery of the damaged database file is completed;

releasing the file lock for the database file based on the recovery of the damaged database file succeeding and after completion of recording the recovery state information; and

controlling the second application to access the recovered database file based on the recovery state information, wherein the recovered database file is accessible by the first application.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 9, 2023
From: SHIN, YOONHO; LEE, KISUNG; JUN, HYEEUN; WOO, HOBIN
To: SAMSUNG ELECTRONICS CO., LTD.
Reel/Frame 062644/0758 →
Priority Claims (1)
KR 10-2022-0016389 · Feb 8, 2022 · national
Continuity (2)
Continuation PCTKR2023001745 · Feb 7, 2023
Related Publication 20230259487A1 · Aug 17, 2023
References Cited (29)
US 11757914B1 · Jakobsson · 2023 [cited by examiner]
US 20050216462A1 · Xiao · 2005 [cited by applicant]
US 20050246612A1 · Leis et al. · 2005 [cited by applicant]
US 20070088970A1 · Buxton et al. · 2007 [cited by applicant]
US 20110246503A1 · Bender · 2011 [cited by examiner]
US 20130227224A1 · Koinuma et al. · 2013 [cited by applicant]
US 20160364158A1 · Narayanan · 2016 [cited by examiner]
US 20170192863A1 · Eluri et al. · 2017 [cited by applicant]
US 20180276268A1 · Doval · 2018 [cited by examiner]
US 20180373877A1 · Bruso · 2018 [cited by examiner]
US 20200034251A1 · Antonopoulos et al. · 2020 [cited by applicant]
US 20200201718A1 · Richter et al. · 2020 [cited by applicant]
US 20200265010A1 · Lee · 2020 [cited by examiner]
US 20210165716A1 · Li · 2021 [cited by examiner]
US 20230342345A1 · Xiao · 2023 [cited by examiner]
CN 101976254A · 2011 [cited by applicant]
CN 112506710A · 2021 [cited by applicant]
JP H07121419B2 · 1995 [cited by applicant]
JP H11134236A · 1999 [cited by applicant]
JP 2009163529A · 2009 [cited by applicant]
KR 20060004915A · 2006 [cited by applicant]
KR 20070031209A · 2007 [cited by applicant]
KR 20090114177A · 2009 [cited by applicant]
KR 100983300B1 · 2010 [cited by applicant]
KR 20130099801A · 2013 [cited by applicant]
KR 20210089266A · 2021 [cited by applicant]
KR 20230070986A · 2023 [cited by applicant]
International Search Report and Written Opinion for International Application No. PCT/KR2023/001745; International Filing Date Feb. 7, 2023; Date of Mailing May 15, 2023; 9 Pages. [cited by applicant]
Extended European Search Report corresponding to Application No. 23753116.5-1203; Dated Dec. 4, 2024. [cited by applicant]