Dong-hee Na <donghee...@python.org> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to