This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author corona10
Recipients corona10, serhiy.storchaka
Date 2021-10-19.02:14:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634609667.94.0.980309030522.issue45452@roundup.psfhosted.org>
In-reply-to
Content
Wow, long discussion than I expected, I wish that you don't feel uncomfortable with my opinion first :)

> The main concern is that it is not clear how to use this feature, and if it is not clear

IMHO, this feature is similar usage level with gdbm.reorganize() API for end-user. 

https://docs.python.org/3/library/dbm.html?highlight=gdbm#dbm.gnu.gdbm.reorganize

I already show you how end-user will use this API in msg404065.
So I don't want to explain the usage again.

> For example, can it be used to implement transactions? 

AFAIk this feature is only used for left snapshot files storing
if the user wants to recover when the user needed.(for example, disk is too old so it can cause the system is down, or any disaster situation, or unexpected system fault)
And snapshot files can be stored anywhere(separated secondary disk, remote-mounted disk.)

So if you can ask snapshot is important? From my side *yes*, it can guarantee that we can recover the file when we want to.

IMHO using this API is up to the end user's purpose.

> I am not even sure that it is Pythonic,

Hmm, you mean API signature? Python has a long tradition of being a thin wrapper to C functions. (gdbm.reorganize() is a good example)

Since gdbm module is the most accessible python client that today Python users can use, I think we have to provide this feature since gdbm authors write this feature for end-user usage.
if not authors may not expose those APIs through `gdbmtool`.

FYI, gdbmtool is a CLI tool that you can execute basic gdbms operations.
If you installed gdbm 1.21 on your local machine, you can use crash tolerance features simply though gdbmtool

The essential of this feature looks simple.
* If you want to left snapshot files for gdbm, please create the gdbm file extension format(X flag) and then execute gdbm_failure_atomic.

If you don't feel the same way, I would like to suggest sending a mailing list and I may requests this to gdbms author since they request this issue to me through a mail and they are also more expert about gdbm more than me.

Thanks for reading.
History
Date User Action Args
2021-10-19 02:14:28corona10setrecipients: + corona10, serhiy.storchaka
2021-10-19 02:14:27corona10setmessageid: <1634609667.94.0.980309030522.issue45452@roundup.psfhosted.org>
2021-10-19 02:14:27corona10linkissue45452 messages
2021-10-19 02:14:27corona10create