Re: [Zope-dev] [ZODB-Dev] when did transaction lose the ability to be usable as a context manager?

2013-02-06 Thread Arfrever Frehtes Taifersar Arahesis
2013-02-06 09:57:14 Chris Withers napisał(a):
 I used to do this:
 
   import transaction
   with transaction:
 ...   print 'hello'
 ...
 Traceback (most recent call last):
File console, line 1, in module
 AttributeError: __exit__
 
 When did that stop working and what should I now do instead?

http://bugs.python.org/issue9220

-- 
Arfrever Frehtes Taifersar Arahesis


signature.asc
Description: This is a digitally signed message part.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] Progress report: porting persistent, BTrees to Python3

2012-12-17 Thread Chris McDonough
On Sun, 2012-12-16 at 22:10 +0100, Godefroid Chapelle wrote:
 Le 15/12/12 01:52, Tres Seaver a écrit :
  I fixed the remainig issues in persistent and released 4.0.5 today:  its
  tests properly exercise the C extensions Under Python 3.2 / 3.3.
 
 I want to express my thanks to you, Tres, for taking care of that work !
 
 This port of ZODB to Python 3 is really a crucial step for the ZTK 
 ecosystem. After the work already done on zope.interface and zope.component.
 
 Further, I'd like to also thank Jim for his work on porting buildout.
 
 When this will be finished, porting the rest of the ZTK should be much 
 easier, which hopefully implies that more of us will be able to 
 participate.

Hear, hear!

- C


___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] Progress report: porting persistent, BTrees to Python3

2012-12-17 Thread Lennart Regebro
On Mon, Dec 17, 2012 at 10:05 AM, Chris McDonough chr...@plope.com wrote:
 On Sun, 2012-12-16 at 22:10 +0100, Godefroid Chapelle wrote:
 Le 15/12/12 01:52, Tres Seaver a écrit :
  I fixed the remainig issues in persistent and released 4.0.5 today:  its
  tests properly exercise the C extensions Under Python 3.2 / 3.3.

 I want to express my thanks to you, Tres, for taking care of that work !

 This port of ZODB to Python 3 is really a crucial step for the ZTK
 ecosystem. After the work already done on zope.interface and zope.component.

 Further, I'd like to also thank Jim for his work on porting buildout.

 When this will be finished, porting the rest of the ZTK should be much
 easier, which hopefully implies that more of us will be able to
 participate.

 Hear, hear!

+lots
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] [announce] NEO 1.0 - scalable and redundant storage for ZODB

2012-08-29 Thread Marius Gedminas
On Tue, Aug 28, 2012 at 06:31:05PM +0200, Vincent Pelletier wrote:
 On Tue, 28 Aug 2012 16:31:20 +0200,
 Martijn Pieters m...@zopatista.com wrote :
  Anything else different? Did you make any performance comparisons
  between RelStorage and NEO?
 
 I believe the main difference compared to all other ZODB Storage
 implementation is the finer-grained locking scheme: in all storage
 implementations I know, there is a database-level lock during the
 entire second phase of 2PC, whereas in NEO transactions are serialised
 only when they alter a common set of objects.

This could be a compelling point.  I've seen deadlocks in an app that
tried to use both ZEO and PostgreSQL via the Storm ORM.  (The thread
holding the ZEO commit lock was blocked waiting for the PostgreSQL
commit to finish, while the PostgreSQL server was waiting for some other
transaction to either commit or abort -- and that other transaction
couldn't proceed because it was waiting for the ZEO lock.)

Marius Gedminas
-- 
People who think, Oh this is a one-off, need to be offed, or perhaps politely
removed from the project.
-- George Neville-Neil


signature.asc
Description: Digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] [announce] NEO 1.0 - scalable and redundant storage for ZODB

2012-08-29 Thread Jim Fulton
On Wed, Aug 29, 2012 at 2:29 AM, Marius Gedminas mar...@gedmin.as wrote:
 On Tue, Aug 28, 2012 at 06:31:05PM +0200, Vincent Pelletier wrote:
 On Tue, 28 Aug 2012 16:31:20 +0200,
 Martijn Pieters m...@zopatista.com wrote :
  Anything else different? Did you make any performance comparisons
  between RelStorage and NEO?

 I believe the main difference compared to all other ZODB Storage
 implementation is the finer-grained locking scheme: in all storage
 implementations I know, there is a database-level lock during the
 entire second phase of 2PC, whereas in NEO transactions are serialised
 only when they alter a common set of objects.

 This could be a compelling point.  I've seen deadlocks in an app that
 tried to use both ZEO and PostgreSQL via the Storm ORM.  (The thread
 holding the ZEO commit lock was blocked waiting for the PostgreSQL
 commit to finish, while the PostgreSQL server was waiting for some other
 transaction to either commit or abort -- and that other transaction
 couldn't proceed because it was waiting for the ZEO lock.)

This sounds like an application/transaction configuration problem.
To avoid this sort of deadlock, you need to always commit in a
a consistent order.  You also need to configure ZEO (or NEO)
to time-out transactions that take too long to finish the second phase.

I don't think NEO's locking strategy mitigates the deadlock problem
much, if at all.

The strategy should provide greater transaction throughput and
reduce latency.  It's a strategy I'd like to implement for ZEO at some
point.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] [announce] NEO 1.0 - scalable and redundant storage for ZODB

2012-08-29 Thread Jim Fulton
On Tue, Aug 28, 2012 at 12:31 PM, Vincent Pelletier vinc...@nexedi.com wrote:
...
 I forgot in the original mail to mention that NEO does all conflict
 resolutions on client side rather than server side. The same happens in
 relStorage, but this is different from ZEO.

That's good.  I'd like to move ZEO in this direction.  I'd also
like to stop hanging conflict-resolution on classes and have
some kind of registry, so that people can set CR policies
independent of class implementation.

I didn't realize that relstorage did client side CR, but thinking
about it, it has to work that way, since there's no relstorage
server.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] [announce] NEO 1.0 - scalable and redundant storage for ZODB

2012-08-28 Thread Vincent Pelletier
On Mon, 27 Aug 2012 14:37:37 +0200,
Vincent Pelletier vinc...@nexedi.com wrote :
 Under the hood, it relies on simple features of SQL databases

To make things maybe a bit clearer, from the feedback I get:
You can forget about SQL presence. NEO usage of SQL is as a relational
as a handful of python dicts is. Except there is no way to load only
part of a pickled dict, or do range searches (ZODB's BTrees are much
better in this regard), or writable to disk atomically without having to
implement this level of atomicity ourselves.

Ideally, NEO would use something like libhail, or maybe even simpler
like kyotocabinet (except that we need composed keys, and kyotocabinet
b-trees have AFAIK no such notion).
SQL as a data definition language was simply too convenient during
development (need a new column ? easy, even if you have a 40GB table),
and it stuck - and we have yet to find a significant drawback to
implement a new storage backend.

As a side effect, SQL allows gathering some statistics over the data
contained in a database very efficiently. Number of current objects,
number of revisions per object, number of transactions, when
transactions occured in base history, average object size, largest
object, you name it.

-- 
Vincent Pelletier
ERP5 - open source ERP/CRM for flexible enterprises
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] [announce] NEO 1.0 - scalable and redundant storage for ZODB

2012-08-28 Thread Martijn Pieters
On Mon, Aug 27, 2012 at 2:37 PM, Vincent Pelletier vinc...@nexedi.com wrote:
 NEO aims at being a replacement for use-cases where ZEO is used, but
 with better scalability (by allowing data of a single database to be
 distributed over several machines, and by removing database-level
 locking), with failure resilience (by mirroring database content among
 machines). Under the hood, it relies on simple features of SQL
 databases (safe on-disk data structure, efficient memory usage,
 efficient indexes).

How does NEO compare to RelStorage? NEO appears to implement the
storage roughly in the same way; store pickles in tables in a SQL
database.

Some differences that I can see from reading your email:

* NEO takes care of replication itself; RelStorage pushes that
responsibility to the database used.
* NEO supports MySQL and sqlite, RelStorage MySQL, PostgreSQL and Oracle.
* RelStorage can act as a BlobStorage, NEO can not.

Anything else different? Did you make any performance comparisons
between RelStorage and NEO?

-- 
Martijn Pieters
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] [announce] NEO 1.0 - scalable and redundant storage for ZODB

2012-08-28 Thread Vincent Pelletier
On Tue, 28 Aug 2012 16:31:20 +0200,
Martijn Pieters m...@zopatista.com wrote :
 Anything else different? Did you make any performance comparisons
 between RelStorage and NEO?

I believe the main difference compared to all other ZODB Storage
implementation is the finer-grained locking scheme: in all storage
implementations I know, there is a database-level lock during the
entire second phase of 2PC, whereas in NEO transactions are serialised
only when they alter a common set of objects.
This removes an argument in favour of splitting databases (ie, using
mountpoints): evading the tpc_vote..tpc_finish database-level locking.

Also, NEO distributes objects over several servers (aka, some or all
servers might not contain the whole database), for load balancing/
parallelism purposes. This is not possible if one relies on relational
database replication alone.

I forgot in the original mail to mention that NEO does all conflict
resolutions on client side rather than server side. The same happens in
relStorage, but this is different from ZEO. Packing on client side
makes it easier to get the setup right: with ZEO you will get more
conflicts than normal if it cannot load some class which implements
conflict resolution, and this might go unnoticed until someone worries
about a performance drop or so. With client-side resolution, if you
don't see Broken Objects, conflict resolution for those classes works.

Some comments on some points you mentioned:
 * NEO supports MySQL and sqlite, RelStorage MySQL, PostgreSQL and
 Oracle.

It should be rather easy to adapt to more back-ends.
We (Nexedi) are not interested in proprietary software, so we will
probably not implement Oracle support ourselves. For PostgreSQL, it's
just that we do not have a setup at hand and the experience to
implement a client properly. I expect that it would not take more than a
week to get PostgreSQL implemented by someone used to it and knowing
python, but new to NEO.

Just to demonstrate that NEO really does not rely on fancy features of
SQL servers, you may dig in older revisions in NEO's git repository. You
can find a btree.py[1] test storage, which is based on ZODB.BTree
class. It was just a toy, without persistence support (I initially
intended to provide it, but never finished it) and hence limited by
the available amount of RAM. But it was otherwise a fully functional NEO
storage backend. I think it took me a week-end to put it together,
while discovering ZODB.Btree API and adapting NEO's storage backend
API along the way (this was the first non-MySQL backend ever
implemented, so API was a bit too ad-hoc at that time).

sqlite was chosen as a way to get rid of the need to setup a
stand-alone SQL server in addition to NEO storage process. We are not
sure yet of how well our database schema holds when there are several
(10+) GB of data in each storage node.

 * RelStorage can act as a BlobStorage, NEO can not.

I would like to stress that this has nothing to do with design, rather
it's just not implemented. We do not wish to rely on filesystem-level
sharing, so we consider something along the lines of providing a
FUSE-based to share blob storage, which then can abstract the blobs
being distributed over several servers. This is just the general idea,
we don't have much experience with blob handling ourselves (which is
why we preferred to leave it asides rather than providing an
unrealistic - and hence unusable - implementation).

[1]http://git.erp5.org/gitweb/neoppod.git/blob/75d83690bd4a34cfe5ed83c949e4a32c7dec7c82:/neo/storage/database/btree.py

Regards,
-- 
Vincent Pelletier
ERP5 - open source ERP/CRM for flexible enterprises
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] [announce] NEO 1.0 - scalable and redundant storage for ZODB

2012-08-27 Thread Lennart Regebro
On Mon, Aug 27, 2012 at 2:37 PM, Vincent Pelletier vinc...@nexedi.com wrote:
 Hi,

 We've just tagged the 1.0 NEO release.

 NEO aims at being a replacement for use-cases where ZEO is used, but
 with better scalability (by allowing data of a single database to be
 distributed over several machines, and by removing database-level
 locking), with failure resilience (by mirroring database content among
 machines). Under the hood, it relies on simple features of SQL
 databases (safe on-disk data structure, efficient memory usage,
 efficient indexes).

That sounds pretty cool!
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] SVN: ZODB/trunk/ Note split of persistent.

2012-08-25 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 08/25/2012 10:24 AM, Hanno Schlichting wrote:
 Could you add zope.wineggbuilder on PyPi as a maintainer to the new 
 standalone persistent package? That way we can automatically build 
 Windows eggs for it, the same way we do for all other packages with C 
 extensions.

Done.

 type(1073741697 * 1024)
 type 'int'
 
 What does that yield on the Windows box?
 
 type 'long' sys.maxint is 2**31 - 1


FWIW, 1073741697 * 1024 requires 40-bits, which obviously won't fit into
an int on 32-bit Windows.  It is also an absurdly large size for a
pickle:  we could probably just use 1073741697 * 4 for that test.



Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlA5JvsACgkQ+gerLs4ltQ6GRACgvzYP+t4ifDS6E1kZDtIXcJtd
d8AAnj0RwHopptEbEh9wb3f0DWiYJKsu
=gBVm
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] RFC: release persistent as a standalone package

2012-07-03 Thread Lennart Regebro
On Mon, Jul 2, 2012 at 7:35 PM, Alan Runyan runy...@gmail.com wrote:
 I would like to release a '4.0.0' version of the package, and switch
 the ZODB trunk to pull it in as a dependency (deleting the currently
 included (older) copy of persistent).  One possible issue is that I
 have not (yet) made the C extensions work under Python 3.2:  I don't
 know whether that should be a blocker for a release.

 I do not believe its a blocker. That is a feature that could be added.

 Comments?

 You rock.

+1
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] RFC: release persistent as a standalone package

2012-07-02 Thread Alan Runyan
 I would like to release a '4.0.0' version of the package, and switch
 the ZODB trunk to pull it in as a dependency (deleting the currently
 included (older) copy of persistent).  One possible issue is that I
 have not (yet) made the C extensions work under Python 3.2:  I don't
 know whether that should be a blocker for a release.

I do not believe its a blocker. That is a feature that could be added.

 Comments?

You rock.

-- 
Alan Runyan

Skype/Twitter:: runyaga
Office:: 713.942.2377 ext 111
http://ploud.com/  Plone site in less than 10 seconds
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] RFC: release persistent as a standalone package

2012-07-01 Thread Laurence Rowe
On 1 July 2012 02:16, Leonardo Rochael Almeida leoroch...@gmail.com wrote:
 I'm +1 on the change even without the answer to my next question, but
 can you elaborate on what is the advantage of releasing persistent
 appart from ZODB?

As well as the clearer separation of concerns it opens up the
possibility for other persistence systems to adopt persistent for
detecting changes to mapped objects, gaining the benefit of its fast C
implementation. The BTrees package is also useful outside the context
of the ZODB.

Laurence
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB Mountpoint broken?

2012-02-29 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/28/2012 09:56 PM, Suresh V. wrote:
 ZODB Mountpoint distributed with Plone 4.1.2 always seems to create 
 OFS.Folder even if the container-class is specified.
 
 Also getting a KeyError: item already present wih same id due to 
 _setObject and _setOb both being called.


Can you post the full traceback for that error?


 Am trying to mount a plone.app.folder.folder.ATFolder from a separate
  Data.fs using instructions in:
 
 http://plone.org/documentation/kb/mount-zeo-into-plonesite


Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9OL8AACgkQ+gerLs4ltQ6KXgCfUSmkU98w0QP3++tzXnmqdClr
0eMAn0XmTpASam2I2zD80b+IF9ONhoTk
=hNK7
-END PGP SIGNATURE-

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB Mountpoint broken?

2012-02-29 Thread Suresh V.

On Wednesday 29 February 2012 07:31 PM, Tres Seaver wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/28/2012 09:56 PM, Suresh V. wrote:

ZODB Mountpoint distributed with Plone 4.1.2 always seems to create
OFS.Folder even if the container-class is specified.

Also getting a KeyError: item already present wih same id due to
_setObject and _setOb both being called.



Can you post the full traceback for that error?



In Products.ZODBMountPoint.MountedObject.py around line 373:

# Add a faux object to avoid generating manage_afterAdd() events
# while appeasing OFS.ObjectManager._setObject(), then discreetly
# replace the faux object with a MountedObject.
faux = Folder()
faux.id = mo.id
faux.meta_type = loaded.meta_type
container._setObject(faux.id, faux)
# DM 2005-05-17: we want to keep our decision about automatic
#  mount point creation
#del mo._create_mount_points
container._setOb(faux.id, mo)
setMountPoint(container, faux.id, mo)

The error was raised on the _setOb() line.

Removing the whole faux dance made everything work correctly. May be 
this is not necessary any more. Should I create a ticket?







Am trying to mount a plone.app.folder.folder.ATFolder from a separate
  Data.fs using instructions in:

http://plone.org/documentation/kb/mount-zeo-into-plonesite



Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9OL8AACgkQ+gerLs4ltQ6KXgCfUSmkU98w0QP3++tzXnmqdClr
0eMAn0XmTpASam2I2zD80b+IF9ONhoTk
=hNK7
-END PGP SIGNATURE-

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope )




___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB Mountpoint broken?

2012-02-29 Thread Suresh V.

On Wednesday 29 February 2012 07:31 PM, Tres Seaver wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/28/2012 09:56 PM, Suresh V. wrote:

ZODB Mountpoint distributed with Plone 4.1.2 always seems to create
OFS.Folder even if the container-class is specified.

Also getting a KeyError: item already present wih same id due to
_setObject and _setOb both being called.



Can you post the full traceback for that error?


2012-03-01 09:40:22 ERROR Zope.SiteErrorLog 1330575022.340.697799684491 
http://localhost:8080/Plone/AllContent/manage_addProduct/ZODBMountPoint/manage_addMounts

Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module Products.ZODBMountPoint.MountedObject, line 387, in 
manage_addMounts

  Module plone.folder.ordered, line 63, in _setOb
  Module Products.BTreeFolder2.BTreeFolder2, line 244, in _setOb
KeyError: 'There is already an item named plant.'





___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] transaction as context manager, exception during commit

2011-02-24 Thread Laurence Rowe
On 24 February 2011 10:17, Chris Withers ch...@simplistix.co.uk wrote:
 Hi Jim,

 The current __exit__ for transaction managers looks like this:

     def __exit__(self, t, v, tb):
         if v is None:
             self.commit()
         else:
             self.abort()

 ..which means that if you're using the transaction package as a context
 manager and, say, a relational database integrity constraint is
 violated, then you're left with a hosed transaction that still needs
 aborting.

 How would you feel about the above changing to:

     def __exit__(self, t, v, tb):
         if v is None:
             try:
                 self.commit()
             except:
                 self.abort()
                 raise
         else:
             self.abort()

 If this is okay, I'll be happy to write the tests and make the changes
 provided someone does a release when I have...

Looking at the way ZPublisher handles this, I think you're right. I
think you might also need to modify the __exit__ in Attempt, which
additionally handles retrying transactions that fail.

Laurence
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] transaction as context manager, exception during commit

2011-02-24 Thread Chris Withers
On 24/02/2011 11:38, Laurence Rowe wrote:
 Hi Jim,

 The current __exit__ for transaction managers looks like this:

  def __exit__(self, t, v, tb):
  if v is None:
  self.commit()
  else:
  self.abort()

 ..which means that if you're using the transaction package as a context
 manager and, say, a relational database integrity constraint is
 violated, then you're left with a hosed transaction that still needs
 aborting.

 How would you feel about the above changing to:

  def __exit__(self, t, v, tb):
  if v is None:
  try:
  self.commit()
  except:
  self.abort()
  raise
  else:
  self.abort()

 If this is okay, I'll be happy to write the tests and make the changes
 provided someone does a release when I have...

 Looking at the way ZPublisher handles this, I think you're right.

Cool, I'll wait for Jim's verdict (and some time to implement it ;-)) 
before diving in...

 I
 think you might also need to modify the __exit__ in Attempt, which
 additionally handles retrying transactions that fail.

Yeah, I see a bug relating to this was reported yesterday:

https://bugs.launchpad.net/bugs/724332

I know it's a different problem, but sounds like the code for attempt 
needs some love...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] Bug (?) in zope/publisher/publish.py:unwrapMethod

2011-01-26 Thread Vincent Pelletier
Le mardi 25 janvier 2011 19:08:11, Tres Seaver a écrit :
 The Zope2-specific version of 'mapply()' (in 'ZPublisher.mapply') is the
 right place to fix this issue, if it is to be fixed:

Thanks for the info.

 P.S. This issue is off-topic for the ZODB list:  I have cross-posted
  to 'zope-dev':  please follow up there.

Woops, lazy typing and wrong mail client completion. I indeed intended it for 
zope-dev.
For some reason, I didn't see your mail on zope-dev (I checked the archives 
too, but they might be lagging).

-- 
Vincent Pelletier
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] Bug (?) in zope/publisher/publish.py:unwrapMethod

2011-01-26 Thread Vincent Pelletier
Le mercredi 26 janvier 2011 08:54:02, Vincent Pelletier a écrit :
 For some reason, I didn't see your mail on zope-dev

As this mail reached the list, I think Tres' mail got caught by some filter. 
Original mail was:

In publish.py[1], unwrapMethod tried to find what can be used to publish an 
object. In a site, I had someone create a very-badly-named func_code 
external method in a place accessible by acquisition from every page on the 
site (this bad by itself, and I corrected it already). This caused 
unwrapMethod to think it can use any object directly for publishing, because 
of:

elif getattr(unwrapped, 'func_code', None) is not None:
break

and unwrapped is still in an acquisition context.

Shouldn't the checks be done on unwrapped (from acquisition context) objects 
instead, to prevent such stupid mistake to have such a wide impact.

I have the intuition that this could even be a security problem, allowing an 
unexpected object to be called instead of another, but I cannot come out with 
an example.

Do you think there is anything to fix in zope.publisher[2] ? If so, I'll open 
a bug.

[1] 
http://svn.zope.org/zope.publisher/trunk/src/zope/publisher/publish.py?view=markup
[2] following Tres' answer, make this Zope2's mapply

Regards,
-- 
Vincent Pelletier
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB replication and high-availability across data centers

2010-10-21 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

sorry, wrong list :

Andreas Jung wrote:
 Hi there,
 
 we are currently investigating options for a large-scale solution
 where the machines (ZEO clients and ZEO server) should be separated
 across two data centers. Incoming traffic should be balanced between
 both data centers. Automatic failover and online-replication are
 desirable - high-performance is a must.
 
 The well-known options are:
 
 ZRS
 (ZEO)
 Relstorage on top of some RDBMS-related clustering/replication mechanism
 NEO
 DRDB
 ZEORaid
 
 Has anyone worked on such a setup or may share some experiences -
 especially by using one of the options above across data-centers
 (with a limited bandwidth inbetween and a higher latency compared to LAN).
 
 Andreas
 
 -- ZOPYX Limited   | zopyx group
 Charlottenstr. 37/1 | The full-service network for Zope  Plone
 D-72070 Tübingen| Produce  Publish
 www.zopyx.com   | www.produce-and-publish.com
 
 E-Publishing, Python, Zope  Plone development, Consulting
 
 

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


- -- 
ZOPYX Limited   | zopyx group
Charlottenstr. 37/1 | The full-service network for Zope  Plone
D-72070 Tübingen| Produce  Publish
www.zopyx.com   | www.produce-and-publish.com
- 
E-Publishing, Python, Zope  Plone development, Consulting


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJMwF+lAAoJEADcfz7u4AZjIkALvR503XjqmYeV16kgcOtgHdGR
siQWM3UMniZQ2ztamUF6d13pDl28HRvfgf8eQMLMHXQ76n0GH6zpK6I53nq88xbH
7K5kqc82GHDnG/SzwwKOEusQrnNdbjIGxLGbEQ7w3kiKy+DdAZG1cBpc/PSQDWFj
opHVVozJ6R7HNldiAoghPR3gORqTYy71txdQNttUxGJXi+nMW0z+G2pN2OUrbb76
QY6F1p5nXrDsotXu6IEePGqBbQNltWOnSZOzDavqF5Fa5rnoD8xMCU8LsA7l+vCS
mLGMHLEs4pCcZuxA0rU/zaWJOl+xMFkvP1jMSlmlX8hF4poPpfIsQ+zSEFlhdECo
6Qncx+2DyrTjPS0SyOOgSCFH+L3rwIIqPaiFgslk0Md+gS1u+rITMn4w+QXKbaTM
7s5PKAaCK0KFDmDO1l+1meeSqgqtMd531swj4He8zCIO91BGnzcbck6p9LFeYHZl
4qXO/zgWFQdt2dsK6qDVF1Cj1Brv9m0=
=BKkk
-END PGP SIGNATURE-
attachment: lists.vcf___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB history problem with Zope 2.12.7

2010-09-28 Thread Chris Withers
On 28/09/2010 12:55, Tres Seaver wrote:
 On 09/28/2010 03:36 AM, Chris Withers wrote:
 On 28/09/2010 00:12, Marius Gedminas wrote:
 --- ./OFS/History.py.orig   2010-09-28 02:11:56.535745440 +0300
 +++ ./OFS/History.py2010-09-28 02:12:00.043764683 +0300
 @@ -151,6 +151,9 @@
base = aq_base(self)
base._p_activate()   # make sure we're not a ghost
base.__setstate__(state) # change the state
 +for attr in dir(base):
 +if attr.startswith('_v_'):
 +delattr(base, attr)
base._p_changed = True   # marke object as dirty
self.manage_afterHistoryCopy()

 Thanks, I guess I'll monkey patch for now, here's the bug:

 https://bugs.launchpad.net/zope2/+bug/649605

 However, I'm curious, so the above will fix the object in the current
 thread, but what about objects in other threads?

 (or do _v_ attributes get killed off at the start of each transaction?)

 Only when objects are ghostified (due to an invalidation from another
 thread or process) or evicted from the cache.  I'm not quite sure how
 the case you are triggering occurs, but if that code saves the new-old
 version of the template to the ZODB, then any instances in other
 threads' connection caches should be invalidated.

Feel free to repeat the steps I originally posted and are in the bug 
description ;-)

Looks like the History.py code isn't doing something it should, but I 
don't know when or what changed to make this so. I'll CC zodb-dev in 
case Jim knows of any changes in ZODB (I'm using 3.9.6) that might be 
relevant...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] attempting to undo an un-undoable transaction gives NotImplementedError with ZODB 3.9.5

2010-09-10 Thread Chris Withers
On 09/09/2010 21:47, Jim Fulton wrote:
 2010-08-26 22:49:01 ERROR txn.-1338986496 Failed to abort resource
 manager:MultiObjectResourceAdapter forZODB.DB.TransactionalUndo
 object at 0x2d509f0  at 47516176
 Traceback (most recent call last):
File transaction-1.1.0-py2.6.egg/transaction/_transaction.py, line
 475, in abort
  rm.abort(self)
File transaction-1.1.0-py2.6.egg/transaction/_transaction.py, line
 548, in abort
  self.manager.abort(o, txn)
File ZODB3-3.9.5-py2.6-macosx-10.3-fat.egg/ZODB/DB.py, line 985, in
 abort
  raise NotImplementedError
 NotImplementedError

 This used to give a meaningful error message.

 In 3.7 and earlier.


 Anyone know why it no longer does?

 The resource manager abort method used to be a pass. In 3.9 in raises
 an exception, which hides the undo exception.

That's bad, right?

 An app should capture
 the undo exception information before calling abort.

the app here is Zope 2's publisher process, right?

 My guess is that this works much better in ZODB 3.10.

Any particular reason?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] attempting to undo an un-undoable transaction gives NotImplementedError with ZODB 3.9.5

2010-09-10 Thread Jim Fulton
On Fri, Sep 10, 2010 at 2:27 AM, Chris Withers ch...@simplistix.co.uk wrote:
 On 09/09/2010 21:47, Jim Fulton wrote:

 2010-08-26 22:49:01 ERROR txn.-1338986496 Failed to abort resource
 manager:MultiObjectResourceAdapter forZODB.DB.TransactionalUndo
 object at 0x2d509f0  at 47516176
 Traceback (most recent call last):
   File transaction-1.1.0-py2.6.egg/transaction/_transaction.py, line
 475, in abort
     rm.abort(self)
   File transaction-1.1.0-py2.6.egg/transaction/_transaction.py, line
 548, in abort
     self.manager.abort(o, txn)
   File ZODB3-3.9.5-py2.6-macosx-10.3-fat.egg/ZODB/DB.py, line 985, in
 abort
     raise NotImplementedError
 NotImplementedError

 This used to give a meaningful error message.

 In 3.7 and earlier.


 Anyone know why it no longer does?

 The resource manager abort method used to be a pass. In 3.9 in raises
 an exception, which hides the undo exception.

 That's bad, right?

It's affect on zope users is, but arguably because Zope 2 is(/was?)
misshandling the exception.  It shouldn't let an exception raised while
handling the original exception hide the original exception. (Of course,
this is a common mistake. I've made it many times myself. :)

 An app should capture
 the undo exception information before calling abort.

 the app here is Zope 2's publisher process, right?

I guess. :)


 My guess is that this works much better in ZODB 3.10.

 Any particular reason?

Because the undo handling was rewritten for 3.10. It was a mess for some time
before.

Jim

-- 
Jim Fulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] attempting to undo an un-undoable transaction gives NotImplementedError with ZODB 3.9.5

2010-09-09 Thread Jim Fulton
On Thu, Aug 26, 2010 at 5:51 PM, Chris Withers ch...@simplistix.co.uk wrote:
 Here's an example:

 2010-08-26 22:49:01 ERROR txn.-1338986496 Failed to abort resource
 manager: MultiObjectResourceAdapter for ZODB.DB.TransactionalUndo
 object at 0x2d509f0 at 47516176
 Traceback (most recent call last):
   File transaction-1.1.0-py2.6.egg/transaction/_transaction.py, line
 475, in abort
     rm.abort(self)
   File transaction-1.1.0-py2.6.egg/transaction/_transaction.py, line
 548, in abort
     self.manager.abort(o, txn)
   File ZODB3-3.9.5-py2.6-macosx-10.3-fat.egg/ZODB/DB.py, line 985, in
 abort
     raise NotImplementedError
 NotImplementedError

 This used to give a meaningful error message.

In 3.7 and earlier.


 Anyone know why it no longer does?

The resource manager abort method used to be a pass. In 3.9 in raises
an exception, which hides the undo exception.  An app should capture
the undo exception information before calling abort.

My guess is that this works much better in ZODB 3.10.

Jim


-- 
Jim Fulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB Documentation Fundraising

2010-06-25 Thread jp
Hi,

If you want a chapter on NEO (http://www.neoppod.org/) or book review, let us 
know, we can write or help. NEO is probably the fastest and most scalable 
storage for ZODB. We also have lots of benchmarks (we use ZODB for huge 
transactional banking applications and for the largest CRM operation  in 
Ireland).

Regards,

JPS.



 The blog: http://zodbdocs.blogspot.com/
 
 I am coordinating an effort to have a ZODB book written by one of our
 Zope clan, Carlos de la Guardia. He has completed a recent book for
 Packt publishing on Grok.  He showed interested in writing a ZODB book
 if it were under Creative Commons.  I have set up a blog and focused
 on behind-the-scenes coordination required to make the book happen.
 
 We are now at a point where:
 
 - There is an initial outline of topics to cover.
 - There is a way to contribute financially on the ZODB Docs Blog
 (through paypal).
 - If you can contribute to the book with written material and
 experience.  Let me know.  I will make a contributor on the blog and
 you can post articles.  Carlos is more than happy to consolidate/pinch
 material (and of course give the original author credit) and put it
 into the final book.  One of the thoughts would be to write ZODB
 mini-howtos/articles on the blog.  Some initial ideas: transaction
 module (datamanagers, aftercommithook, etc), debugging scenarios (how
 to debug a record being mutated accidentally), conflict resolution
 (writing your own custom impl, btree bucket splits, etc), concurrency,
 any benchmarking information you have, relstorage, writing your own
 persistence format (keas.pbpersist?), or query strategies for ZODB.
 There is a lot of material to cover in this book.
 - There are also contribution/funding levels available which correlate
 to recognition of your donation in the book.  That is right.  Give
 money and you go down in history in the documentation *wink*
 
 We will have a revised outline of the book by Monday evening from
 Carlos.  If you want to contribute material to the Blog -- let me
 know.  You have a channel to  voice your experience.
 
 More information is on the blog and will be updated as more progress
 is made. Again the blog is at, http://zodbdocs.blogspot.com/ -- please
 sign up and subscribe to the RSS feed.
 
 I am open for any feedback.  I desperately want to get the larger
 community support and feedback early as possible.  Please feel free to
 send comments, concerns, criticisms.
 
 cheers,
 alan runyan
 ___
 Zope-Dev maillist  -  Zope-Dev@zope.org
 https://mail.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope )
 ___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB Documentation Fundraising

2010-06-25 Thread Charlie Clark
Am 24.06.2010, 21:19 Uhr, schrieb Alan Runyan runy...@gmail.com:

 I am open for any feedback.  I desperately want to get the larger
 community support and feedback early as possible.  Please feel free to
 send comments, concerns, criticisms.

Great idea Alan, but

So if you want to donate. Send us some money. You can use Paypal or send  
us a check.

I don't do Paypal and I couldn't send you a cheque if I wanted to. IBAN,  
please.

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB Documentation Fundraising

2010-06-25 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

j...@nexedi.com wrote:
 Hi,
 
 If you want a chapter on NEO (http://www.neoppod.org/) or book review, let us 
 know, we can write or help. NEO is probably the fastest and most scalable 
 storage for ZODB. We also have lots of benchmarks (we use ZODB for huge 
 transactional banking applications and for the largest CRM operation  in 
 Ireland).
 

Could you please post the benchmark results?

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwkg0wACgkQCJIWIbr9KYx3xgCgs61Uzkl/MnLucJ4V2eHCnCbA
sOMAoMWbxkJxjkKZe5lPwfL03OnT+1gS
=8YWt
-END PGP SIGNATURE-
attachment: lists.vcf___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB Documentation Fundraising

2010-06-24 Thread Chris McDonough
Thanks for organizing this Alan.  Hopefully folks will follow your lead
and contribute.  Agendaless put some money into the pot today.

On Thu, 2010-06-24 at 14:19 -0500, Alan Runyan wrote:
 The blog: http://zodbdocs.blogspot.com/
 
 I am coordinating an effort to have a ZODB book written by one of our
 Zope clan, Carlos de la Guardia. He has completed a recent book for
 Packt publishing on Grok.  He showed interested in writing a ZODB book
 if it were under Creative Commons.  I have set up a blog and focused
 on behind-the-scenes coordination required to make the book happen.
 
 We are now at a point where:
 
 - There is an initial outline of topics to cover.
 - There is a way to contribute financially on the ZODB Docs Blog
 (through paypal).
 - If you can contribute to the book with written material and
 experience.  Let me know.  I will make a contributor on the blog and
 you can post articles.  Carlos is more than happy to consolidate/pinch
 material (and of course give the original author credit) and put it
 into the final book.  One of the thoughts would be to write ZODB
 mini-howtos/articles on the blog.  Some initial ideas: transaction
 module (datamanagers, aftercommithook, etc), debugging scenarios (how
 to debug a record being mutated accidentally), conflict resolution
 (writing your own custom impl, btree bucket splits, etc), concurrency,
 any benchmarking information you have, relstorage, writing your own
 persistence format (keas.pbpersist?), or query strategies for ZODB.
 There is a lot of material to cover in this book.
 - There are also contribution/funding levels available which correlate
 to recognition of your donation in the book.  That is right.  Give
 money and you go down in history in the documentation *wink*
 
 We will have a revised outline of the book by Monday evening from
 Carlos.  If you want to contribute material to the Blog -- let me
 know.  You have a channel to  voice your experience.
 
 More information is on the blog and will be updated as more progress
 is made. Again the blog is at, http://zodbdocs.blogspot.com/ -- please
 sign up and subscribe to the RSS feed.
 
 I am open for any feedback.  I desperately want to get the larger
 community support and feedback early as possible.  Please feel free to
 send comments, concerns, criticisms.
 
 cheers,
 alan runyan
 ___
 Zope-Dev maillist  -  Zope-Dev@zope.org
 https://mail.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope )
 


___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] Problem with handling of data managers that join transactions after savepoints

2010-05-11 Thread Chris Withers
Jim Fulton wrote:
 I plan to implement A soon if there are no objections.

 Unless someone somehow convinced me to do D, I'll also add an
 assertion in the Transaction.join method to raise an error if a
 data manager joins more than once.
 Option A sounds sensible. It also means I won't have to change
 anything in the zope.sqlalchemy data manager.
 
 Very cool. I was hoping non-ZODB-data-manager authors
 were paying attention. :)
 
 If anyone knows of any other, I would appreciate someone forwarding
 this thread to them.

zope.sendmail and MaildropHost have data managers.
I've seen some file-based things that was a data manager and a few 
others in people's BFG stacks, maybe they can pipe up and/or let the 
others of those wsgi components know.

I'm also likely about to write one, but I'm dumb, so can't comment 
meaningfully on the options ;-)

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB issue

2010-02-05 Thread Jim Fulton
On Thu, Feb 4, 2010 at 8:00 PM, Roger d...@projekt01.ch wrote:
...
 But probably this is a problem and should't get released as is.
 Any hints?

You need to rerun your buildout. There are new (C) methods on fsBuckets.

Jim

-- 
Jim Fulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] Splitting a large ZODB file storage - any light-weight approach?

2009-12-30 Thread Jens Vagelpohl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andreas Jung wrote:
 Hi there,
 
 we have some huge ZODB file storage (60-80 GB each) and we want
 to split the storage into a number of smaller storage (easier
 to handle for backup and packing). The storages themselves only
 contain a few (Zope 2) folders  - let's say folders A, B, C -
 within the root and we want to create seperate storages for A, B, C.
 
 Is there some easier approach than using the Zope 2 CopyManager API
 for moving data around. The ZODB storage iterator API comes to my mind...
 is this a suitable approach or is there some other light-weight approach
 (compared to using CopyManager API)?

Why move any data between ZODBs at all? In this situation I would try
the following:

 - create a new empty ZODB. This one holds the root.

 - copy the old Data.fs into three new storage server buildouts. Attach
to each with a ZEO client and delete the folders you do not need in that
particular storage in the ZMI or via zopectl debug.

 - pack each storage so the deleted data gets trashed and the files shrink.

 - mount the folder storages into the new empty root using mount
points on the clients that will use the storages.

jens

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAks7CpEACgkQRAx5nvEhZLKjYgCdGI71f/yNJS3EIpZxkyFVBmSe
qhMAoJ8RBK2eq27P67Iki4h4MYMZ1kZB
=FC8f
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] Splitting a large ZODB file storage - any light-weight approach?

2009-12-30 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jens Vagelpohl wrote:

 - copy the old Data.fs into three new storage server buildouts.
 Attach to each with a ZEO client and delete the folders you do not
 need in that particular storage in the ZMI or via zopectl debug.
Delete operations will trigger events modifying other global metadata
related
to the those objects. So this approach requires modification to the
application in
order to avoid such side effects.

Andreas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAks7DFEACgkQCJIWIbr9KYxIcACgonZfwXWmTqguW2tlcoEsLfNv
9KMAn0+h5EZ59ConlsKUNa1BWn2+bTt2
=bP9X
-END PGP SIGNATURE-

attachment: lists.vcf___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] Splitting a large ZODB file storage - any light-weight approach?

2009-12-30 Thread Hanno Schlichting
On Wed, Dec 30, 2009 at 9:16 AM, Andreas Jung li...@zopyx.com wrote:
 Delete operations will trigger events modifying other global metadata
 related
 to the those objects. So this approach requires modification to the
 application in
 order to avoid such side effects.

But if you do it from a debug prompt, you can easily prevent those
events from being fired.

For a normal ObjectManager you do:

delattr(root, 'A')  # this is what _delOb does
root._objects = tuple([i for i in root._objects if i['id'] != 'A'])

That's the actually important part of _delObject method, without
firing any events or calling any manage_ methods.

Hanno
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB Competing read/writes: How to find out which attribute?

2009-10-12 Thread Jim Fulton
On Sun, Oct 11, 2009 at 3:27 PM, Marius Gedminas mar...@gedmin.as wrote:
...
 Sadly, the ZODB doesn't track backreferences, so there only way to find
 out for sure what points to your object is to do a full graph traversal.

The zc.zodbdgc package has a database verification scripts that
optionally creates a backreference database.

Jim

-- 
Jim Fulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB Competing read/writes: How to find out which attribute?

2009-10-11 Thread Jim Fulton
On Sat, Oct 10, 2009 at 10:00 PM, Shane Hathaway sh...@hathawaymix.org wrote:
 Hermann Himmelbauer wrote:
 That's exactly the problem - it's a read operation and there should not be 
 any
 write operation involved. However, it's hard to find out where the write
 operation in my code occurs, I can't find it in the view, maybe there's
 something in the authentication code, but I'd have to dig deep through my
 source. So It would be extremely helpful to know a faster way to find out
 what code triggered this warning.

 The code that modifies something will indirectly call the register()
 method of the ZODB.Connection class.  If you arrange for
 Connection.register() to raise an exception when the transaction is not
 supposed to modify anything, you should get a traceback that pinpoints
 what is doing the modification.  Unfortunately, there is no API for
 that, so the easiest thing to do is modify the source code of the
 register() method in ZODB.Connection.  Fortunately, this is Python, so
 modifying someone else's code is usually quite easy. :-)

Easier yet, in a development environment, add a breakpoint in register
and make a read-only request to see what's causing it to be called and
why.

Jim

-- 
Jim Fulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB Competing read/writes: How to find out which attribute?

2009-10-10 Thread Hermann Himmelbauer
Am Freitag 09 Oktober 2009 21:44:12 schrieb Roger Ineichen:
 Hi Hermann

  Betreff: Re: [Zope-dev] ZODB Competing read/writes: How to
  find out which attribute?
 
  Hermann Himmelbauer wrote:
   Hi,
   I once in the while get the following warning in my Zope 3
 
  log, which
 
   I'd like to resolve:
  
   2009-10-07T14:35:41 WARNING ZopePublication Competing
 
  writes/reads at
 
  /BSPSite/act/++vh++http:zis.act.at:80/bankneu/++/c/acc/booklis

 t/index.html:
   database conflict error (oid 0x7a5d, class BTrees.OOBTree.OOBTree,
   serial this txn started with 0x0381388ca6804966 2009-10-07
   12:28:39.023700, serial currently committed 0x03813893b087d0cc
   2009-10-07 12:35:41.374343)
 
  That URL looks like it should only be reading the database,
  but the fact that you get a conflict error suggests that the
  code behind that URL is writing to the database.  If I were
  you, I would first ensure that read operations never write to
  the database.

 just a hint, sometimes session get accessed with session[key]
 wich will force a write operation. If so, you can prevent creating
 a new session by using session.get(key, someDefaultValue)

Thanks for the info - but why is that? I always had the impression, that 
mydict['mykey'] does the same as mydict.get('mykey')?

What exactly is written during session['mykey']?

Moreover, does that concurrent read/write problem with sessions apply to one 
user only or to anyone who accesses the session?

Best Regards,
Hermann

-- 
herm...@qwer.tk
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB Competing read/writes: How to find out which attribute?

2009-10-10 Thread Hermann Himmelbauer
Am Freitag 09 Oktober 2009 19:12:09 schrieb Shane Hathaway:
 Hermann Himmelbauer wrote:
  Hi,
  I once in the while get the following warning in my Zope 3 log, which I'd
  like to resolve:
 
  2009-10-07T14:35:41 WARNING ZopePublication Competing writes/reads
  at
  /BSPSite/act/++vh++http:zis.act.at:80/bankneu/++/c/acc/booklist/index.htm
 l: database conflict error (oid 0x7a5d, class BTrees.OOBTree.OOBTree,
  serial this txn started with 0x0381388ca6804966 2009-10-07
  12:28:39.023700, serial currently committed 0x03813893b087d0cc 2009-10-07
  12:35:41.374343)

 That URL looks like it should only be reading the database, but the fact
 that you get a conflict error suggests that the code behind that URL is
 writing to the database.  If I were you, I would first ensure that read
 operations never write to the database.

That's exactly the problem - it's a read operation and there should not be any 
write operation involved. However, it's hard to find out where the write 
operation in my code occurs, I can't find it in the view, maybe there's 
something in the authentication code, but I'd have to dig deep through my 
source. So It would be extremely helpful to know a faster way to find out 
what code triggered this warning.

Best Regards,
Hermann

-- 
herm...@qwer.tk
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB Competing read/writes: How to find out which attribute?

2009-10-10 Thread Shane Hathaway
Hermann Himmelbauer wrote:
 That's exactly the problem - it's a read operation and there should not be 
 any 
 write operation involved. However, it's hard to find out where the write 
 operation in my code occurs, I can't find it in the view, maybe there's 
 something in the authentication code, but I'd have to dig deep through my 
 source. So It would be extremely helpful to know a faster way to find out 
 what code triggered this warning.

The code that modifies something will indirectly call the register() 
method of the ZODB.Connection class.  If you arrange for 
Connection.register() to raise an exception when the transaction is not 
supposed to modify anything, you should get a traceback that pinpoints 
what is doing the modification.  Unfortunately, there is no API for 
that, so the easiest thing to do is modify the source code of the 
register() method in ZODB.Connection.  Fortunately, this is Python, so 
modifying someone else's code is usually quite easy. :-)

Shane

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB Competing read/writes: How to find out which attribute?

2009-10-09 Thread Shane Hathaway
Hermann Himmelbauer wrote:
 Hi,
 I once in the while get the following warning in my Zope 3 log, which I'd 
 like 
 to resolve:
 
 2009-10-07T14:35:41 WARNING ZopePublication Competing writes/reads 
 at 
 /BSPSite/act/++vh++http:zis.act.at:80/bankneu/++/c/acc/booklist/index.html: 
 database conflict error (oid 0x7a5d, class BTrees.OOBTree.OOBTree, serial 
 this txn started with 0x0381388ca6804966 2009-10-07 12:28:39.023700, serial 
 currently committed 0x03813893b087d0cc 2009-10-07 12:35:41.374343)

That URL looks like it should only be reading the database, but the fact 
that you get a conflict error suggests that the code behind that URL is 
writing to the database.  If I were you, I would first ensure that read 
operations never write to the database.

Shane

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB Competing read/writes: How to find out which attribute?

2009-10-09 Thread Roger Ineichen
Hi Hermann

 Betreff: Re: [Zope-dev] ZODB Competing read/writes: How to 
 find out which attribute?
 
 Hermann Himmelbauer wrote:
  Hi,
  I once in the while get the following warning in my Zope 3 
 log, which 
  I'd like to resolve:
  
  2009-10-07T14:35:41 WARNING ZopePublication Competing 
 writes/reads at 
  
 /BSPSite/act/++vh++http:zis.act.at:80/bankneu/++/c/acc/booklis
t/index.html:
  database conflict error (oid 0x7a5d, class BTrees.OOBTree.OOBTree, 
  serial this txn started with 0x0381388ca6804966 2009-10-07 
  12:28:39.023700, serial currently committed 0x03813893b087d0cc 
  2009-10-07 12:35:41.374343)
 
 That URL looks like it should only be reading the database, 
 but the fact that you get a conflict error suggests that the 
 code behind that URL is writing to the database.  If I were 
 you, I would first ensure that read operations never write to 
 the database.

just a hint, sometimes session get accessed with session[key]
wich will force a write operation. If so, you can prevent creating
a new session by using session.get(key, someDefaultValue)

Regards
Roger Ineichen

 Shane
 
 ___
 Zope-Dev maillist  -  Zope-Dev@zope.org
 https://mail.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  ** (Related lists -  
 https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope )
 

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB moved class upgrade script Was: zope.testrunner import location notifications

2009-06-23 Thread Christian Theune
Hi,

On Mon, 2009-06-08 at 09:49 +0200, Christian Theune wrote:
 Hi,
 
 On Tue, 2009-05-26 at 12:42 +0200, Martijn Faassen wrote:
  Hi there,
  
  (in particular Christian Theune)
  
  What's the status of the 'import location' notification functionality in 
  zope.testrunner?
  
  What's the status of the ZODB migration code?
 
 Done. I just released the package `zodbupgrade` on PyPI providing a tool
 and some documentation how to apply it to your databases
 
 I got the idea of also providing a way to describe renames/moves
 (possibly using entry points for hooking up the declaration) and that
 can manipulate databases when the code is gone already so we can migrate
 in one go instead of using intermediate releases.

I've released the second version of this tool which I consider stable.
It is now called ``zodbupdate``.

The major shift is that it allows to provide a pre-defined set of
class-renaming rules and can rewrite pickles in ZODBs without having the
actual code activated in the Python interpreter. It does this by dis-
and re-assembling the pickles.

I consider the ZODB migration code project to be finished with this.

@Martijn: Did we have a place somewhere in the documentation that needs
to be updated to reference this?

Cheers,
Christian
-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1
Zope and Plone consulting and development


signature.asc
Description: This is a digitally signed message part
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] Removing the unused and untested ZODB.Mount module

2009-06-11 Thread Jim Fulton

On Jun 11, 2009, at 2:19 PM, Tres Seaver wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Jim Fulton wrote:
 It looking for the ZODBMountPoint object that Tarek refered to, I saw
 that there is still  a Mount module in the ZODB package.  AFAIK, this
 a fossil that never should have been included in ZODB in the first
 place. I'm going to remove it from the trunk and from 3.8.

 A somewhat late follow up :) :

 I backported today the change from the Zope2 trunk to the 2.10 and  
 2.11
 branches, moving that module from ZODB to the TemporaryStorage  
 product.
 It should now be easier for folks to experiment with using ZODB  
 3.9.x in
 the earlier Z2 versions.

Cool. Thanks. :)

Jim

--
Jim Fulton
Zope Corporation


___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB change notifications

2009-01-22 Thread Rowan Woodhouse
Laurence Rowe wrote:
 Rowan Woodhouse wrote:
 Hi,

 I've got two clients accessing the same object at the same time (one is 
 Zope and the other is a worker interfacing to another system). In the 
 worker client I need to detect a change to the value of an attribute 
 made by the Zope client. I can do this by polling the value of the 
 attribute that I'm interested in but I am wondering if there is a more 
 elegant and efficient way of doing this.

 Any ideas?
 
 Perhaps try hooking into the ZEO cache invalidation mechanism.
 
 Laurence

Thanks, I'll give that a go and get back to the list with what I work out.

Rowan

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB change notifications

2009-01-20 Thread Laurence Rowe
Rowan Woodhouse wrote:
 Hi,
 
 I've got two clients accessing the same object at the same time (one is 
 Zope and the other is a worker interfacing to another system). In the 
 worker client I need to detect a change to the value of an attribute 
 made by the Zope client. I can do this by polling the value of the 
 attribute that I'm interested in but I am wondering if there is a more 
 elegant and efficient way of doing this.
 
 Any ideas?

Perhaps try hooking into the ZEO cache invalidation mechanism.

Laurence

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] SVN woes.

2008-11-11 Thread Wichert Akkerman

On 11/11/08 4:10 PM, Izak Burger wrote:

Jim Fulton wrote:
   

I'm going to restore svn from a backup and see where that leaves us.
I'm going to disable svn access while I work on this.
 


Good luck :-) I know a little something about the hard work involved in
recovering subversion repos, in the last year we had TWO cases of
corrupted revisions in an svn repo we were managing. It had something to
do with concurrent commits and the fact that we were running
apache-mpm-worker (instead of prefork).
   


FWIW, the setup we have for svn.plone.org may be useful for others as 
well: we have two servers (svn.plone.org and svn-mirror.plone.org) with 
a svnsync setup to keep the mirror (almost) realtime in sync with the 
main server. There is an LDAP database which is replicated between the 
two servers as well which we use for authentication. This setup allows 
us to swich svn.plone.org to the other server in minutes if it dies, 
without any loss of data.


Wichert.

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] svn.zope.org up again?

2008-11-11 Thread Christian Theune
On Tue, 2008-11-11 at 12:35 +0200, Marius Gedminas wrote:
 On Tue, Nov 11, 2008 at 08:51:28AM +0100, Adam GROSZER wrote:
  Hello Stephan,
  
  svn: Can't open file '/svn/repos/main/db/revs/70320': No such file or 
  directory
  program finished with exit code 1
  
  Seems that one revision did not get restored.
  It breaks also on show log, where other folders with older revisions
  seem to work.
 
 I've a full svn mirror up to rev 92837 if it turns out to be needed.

Same here. :) 

It's publicly available at: http://svn.zope.de/zope.org

-- 
Christian Theune · [EMAIL PROTECTED]
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1
Zope and Plone consulting and development


signature.asc
Description: This is a digitally signed message part
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] svn.zope.org up again?

2008-11-11 Thread Marius Gedminas
On Tue, Nov 11, 2008 at 08:51:28AM +0100, Adam GROSZER wrote:
 Hello Stephan,
 
 svn: Can't open file '/svn/repos/main/db/revs/70320': No such file or 
 directory
 program finished with exit code 1
 
 Seems that one revision did not get restored.
 It breaks also on show log, where other folders with older revisions
 seem to work.

I've a full svn mirror up to rev 92837 if it turns out to be needed.

Marius Gedminas
-- 
IBM motto: If you can't read our assembly language, you must be
borderline dyslexic, and we don't want you to mess with it anyway
-- Linus Torvalds


signature.asc
Description: Digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] svn.zope.org up again?

2008-11-10 Thread Adam GROSZER
Hello Stephan,

svn: Can't open file '/svn/repos/main/db/revs/70320': No such file or directory
program finished with exit code 1

Seems that one revision did not get restored.
It breaks also on show log, where other folders with older revisions
seem to work.

Tuesday, November 11, 2008, 6:55:51 AM, you wrote:

SR Hi all,

SR it seems like Zope's SVN is back up again. However, when trying to checkout
SR zope.app.container/trunk gives me an SVN error. Is anyone else seeing this?

SR Regards,
SR Stephan


-- 
Best regards,
 Adam GROSZERmailto:[EMAIL PROTECTED]
--
Quote of the day:
Mothers shouldn't make too many sacrifices

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zodb time-stamp reduction error without time chaning on server

2006-10-04 Thread Dieter Maurer
Chris Withers wrote at 2006-10-4 15:06 +0100:
 ...
The interesting thing is that it looks like the transactions where the 
time appears to go backwards are duplicates of earlier transactions:

position in file   tid time from tid
310253762330x03689abb582f1311  2006-10-03 04:43:20.668098
310253765080x03689abdbbe5f000  2006-10-03 04:45:44.038639
310253767830x03689abddbe6be55  2006-10-03 04:45:51.539377

...lots of transactions...

310256469130x03689abb582f1311  2006-10-03 04:43:20.668098
310256471880x03689abdbbe5f000  2006-10-03 04:45:44.038639
310256474630x03689abddbe6be55  2006-10-03 04:45:51.539377

Would this seem to be an accurate reading of the attached log?

It looks as if you had given the same incremental file twice
to repozo.

1. Could repozo have a bug that resulted in this?

Maybe, especially when the same file is twice integrated

2. If repozo has no bug, should it have checking that makes sure it
doesn't build insane .fs files, or is fstest the way to go for that?

As fstest found this problem, it was not too bad.

3. If repozo is not to blame, what could be?

One possibility would be a bad call.



-- 
Dieter
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zodb time-stamp reduction error without time chaning on server

2006-10-04 Thread Chris Withers

Dieter Maurer wrote:


3. If repozo is not to blame, what could be?


One possibility would be a bad call.


A bad call?

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zodb time-stamp reduction error without time chaning on server

2006-10-04 Thread Dieter Maurer
Chris Withers wrote at 2006-10-4 18:23 +0100:
Dieter Maurer wrote:

 3. If repozo is not to blame, what could be?
 
 One possibility would be a bad call.

A bad call?

You should read my messages carefully!

  E.g. a call where the same incremental backup file
  is presented more than onces to repozo -- as
  mentioned several times in stripped part of
  the message you have reported to.



-- 
Dieter
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB for Java?

2004-04-15 Thread Romain Slootmaekers
Ian Beatty wrote:
Greetings.

Does anyone know of a good (stable, reliable, fast enough for production 
use in a web app) ZODB-equivalent for persisting Java objects?
www.jdocentral.com


Thanks,

..Ian

-- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- --
Dr. Ian Beatty   [EMAIL PROTECTED]
Physics Education Researchvoice: 413.545.9483
Department of Physics   fax: 413.545.4884
Univ. of Massachusetts  AIM: (available upon request)
Amherst, MA 01003-9337 USA   http://umperg.physics.umass.edu/
-- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- --
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB for Java?

2004-04-14 Thread Andreas Jung
hi,

you should search on freshmeat.net.

-aj

--On Montag, 12. April 2004 16:05 Uhr -0400 Ian Beatty 
[EMAIL PROTECTED] wrote:

Greetings.

Does anyone know of a good (stable, reliable, fast enough for production
use in a web app) ZODB-equivalent for persisting Java objects?
Thanks,

..Ian

-- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- --
Dr. Ian Beatty   [EMAIL PROTECTED]
Physics Education Researchvoice: 413.545.9483
Department of Physics   fax: 413.545.4884
Univ. of Massachusetts  AIM: (available upon request)
Amherst, MA 01003-9337 USA   http://umperg.physics.umass.edu/
-- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- --
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -  http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB with twisted web.

2004-04-05 Thread Chris Withers
Syver Enstad wrote:

I am checking out how to use ZODB with twisted web. 
Not sure, but you could check the SchoolTool project, which I know uses ZODB and 
twisted, just not sure if it uses twisted.web or not...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB with twisted web.

2004-04-04 Thread Kapil Thangavelu
On Fri, 2004-04-02 at 17:37, Dieter Maurer wrote:
 Syver Enstad wrote at 2004-4-2 11:38 +0200:
 I am checking out how to use ZODB with twisted web. I thought that I
 would have the DB instance globally accesible and call the open method
 to get a connection on each request. I thought that if I use
 connection.getTransaction().commit() before sending the response I
 will commit on the connection for that request. Is this necesarily
 true when using twisted web because it is single threaded and it seems
 that ZODB finds the correct transaction by checking the thread.
 
 This is true only, when you are working with local transaction mode
 (i.e. you are calling connection.setLocalTransaction()).
 
 Currently, this mode restricts you to a single transaction client.
 Neither relational databases nor other transactional clients
 understand this mode. Moreover, you cannot use DBTab to
 mount several ZODB storages.
 

i wouldnt say it restricts you to a single txn client, local transaction
mode with twisted allows for the primary goal of using single threaded
twisted with zodb txn semantics bound to protocol instances/clients, and
the txn framework is still perfectly capable, just that the resource
integration of other txn aware resources needs to play well with zodb
conn based txns, which basically rules out most of the existing zope
products as they use a global accessor to the transaction as opposed to
call getTransaction on a conn which would still allow zodb to play a txn
authority/manager role. but at the level of using twisted and zodb
directly those products wouldn't likely be all that useful.

-cheers,

-kapil



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB with twisted web.

2004-04-02 Thread Dieter Maurer
Syver Enstad wrote at 2004-4-2 11:38 +0200:
I am checking out how to use ZODB with twisted web. I thought that I
would have the DB instance globally accesible and call the open method
to get a connection on each request. I thought that if I use
connection.getTransaction().commit() before sending the response I
will commit on the connection for that request. Is this necesarily
true when using twisted web because it is single threaded and it seems
that ZODB finds the correct transaction by checking the thread.

This is true only, when you are working with local transaction mode
(i.e. you are calling connection.setLocalTransaction()).

Currently, this mode restricts you to a single transaction client.
Neither relational databases nor other transactional clients
understand this mode. Moreover, you cannot use DBTab to
mount several ZODB storages.

Jeremy is working on a new transaction interface for Zope 2.8./ZODB 3.3
I expect that it will fully support a thread independent
transaction mode.

-- 
Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB cache age

2004-02-28 Thread Dieter Maurer
Jeremy Hylton wrote at 2004-2-27 11:11 -0500:
 ... cache age ...
I'd like to mark all of these APIs as deprecated.  That includes
manage_cache_age in App.CacheManager and a handful of methods in
ZODB.DB.

+1 

-- 
Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB load state error

2004-01-26 Thread Toby Dickenson
On Monday 26 January 2004 12:08, Thyb wrote:

 What could be the problem?

That indicates that you are out of memory. If that doesnt seem right, maybe 
your storage is corrupt in a manner that the unpickler interprets as 
something with a huge memory footprint.


-- 
Toby Dickenson


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


RE: [Zope-dev] ZODB load state error

2004-01-26 Thread Tim Peters
[Tibor Tolgyesi]
 I just found this in my Zope log file. After this error the Zope
 system stopped. No wonder, but certainly not because of physical
 memory error. What could be the problem?

 My config is:
 AiX 5.2
 Python 2.3.2
 Zope 2.7.0-b3
 Apache 1.3.26

 The error message:
 2004-01-25T02:55:21 ERROR(200) ZODB Couldn't load state for
  3ef2
 Traceback (most recent call last):
   File /opt/freeware/zope/lib/python/ZODB/Connection.py,
   line 564, in setstate
 self._set_ghost_state(obj, p)
   File /opt/freeware/zope/lib/python/ZODB/Connection.py,
   line 603, in _set_ghost_state
 state = unpickler.load()
 MemoryError

If anyone has seen the same error, and especially if you have a reproducible
test case, please add your info to the collector issue Tibor opened about
it:

http://zope.org/Collectors/Zope/1204

It's most likely that something got corrupted, but there's not enough info
about this kind of error yet to guess exactly where or how or why.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB object upgrades

2003-11-05 Thread Dieter Maurer
alan milligan wrote at 2003-11-2 14:13 +:
  ...
  I now desperately need to write a parser to convert all of these nasties to 
  ZCurrency types.   I've come up with the following ExternalMethod - whereby 
  I've defined a __currency__ attribute in each obselete incantation's product 
  ...
  def repair(container, counter=0):
  ...
  counter += 1
  ...
  repair(object, counter)
  return counter
  ...
  However, it doesn't seem to find anything to convert.  Does anyone have any 
  ideas?

counter is an integer and integers are immutable.
Therefore, counter += 1 does not change the integer object
but assigns a new one to counter. This change is local to
the repair incarnation. The counter in the caller is not changed.

-- 
Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB: Are all handles closed?

2003-03-07 Thread Steve Alexander
Ulla Theiss wrote:
Hello list,

in our product (and additionally in an other process) we use separate
ZODB-Storages.
Opening and closing the ZODB several times the number of file-handles
increases.
You might want to post this to [EMAIL PROTECTED] instead of 
[EMAIL PROTECTED]

Also, be sure to say what version of python and zodb you are using.

--
Steve Alexander


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZODB, Catalog and actually using it

2002-05-29 Thread Casey Duncan

try:

  ob = r.getObject()
  ob.function()

or if that doesn't work:

  ob = catalog.getobject(r.data_record_id_)
  ob.function()

Bear in mind that getObject traverses to the object which is expensive both in 
time and memory if the number of results is large.

hth,

-Casey

On Wednesday 29 May 2002 04:05 pm, Nicholas Henke wrote:
 Hello~~
   I am playing with using the Catalog class in ZCatalog along with 
CatalogQuery 
 to create a generic object layer on top of ZODB. I can index and search til 
I 
 am blue in the face, and I always get the correct answers. Now for the 
 problems...
 
 Say I have the following obj:
 class test(Persistent):
   variable = 1
   def function(self):
   print self.__dict__
 
 now if I do:
 catalog = Catalog()
 catalog.addIndex('variable', Fieldindex('variable'))
 catalog.addColumn('variable')
 obj = test()
 catalog.catalogObject(obj, id(obj))
 
 catalog_query = CatalogQuery(catalog, variable==1)
 results = catalog_query()
 for r in results:
   print r.variable  # ok
   print r.getRID() # ok
   print r.function # NameError
 
 ...so I can get an object (a mybrains instance )back that allows me to print 
 r.variable, but I cannot get r.function(). 
 How does one do this? Is there a mapping between RIDs in the catalog and 
real 
 objects somewhere? Do I need to do that mapping in an IOBtree (it would make 
 the most sense since I am using id(obj) as the uid in the catalog)? Is there 
 somewhere in Zope/google/web that does this?
 
 Thanks for any help!!
 Nic 
 
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZODB, Catalog and actually using it

2002-05-29 Thread Nicholas Henke

On Wednesday 29 May 2002 04:20 pm, Casey Duncan wrote:
 try:

   ob = r.getObject()
   ob.function()

ob gets returned as None -- I think this is due to 
AbstractCatalogBrain::getObject(). I don't believe self.aq_parent is set 
correctly -- how is it supposed to be set ?


 or if that doesn't work:

   ob = catalog.getobject(r.data_record_id_)
AttributeError -- getobject doesnt exist?

   ob.function()

 Bear in mind that getObject traverses to the object which is expensive both
 in time and memory if the number of results is large.

OK -- is there a better way to do all of this ?  What I am trying to do is 
have ZODB store objects and Catalog maintain indexes on them. Now I can come 
back and do a 'SELECT' on the objects, say for variable != 1, and somehow get 
access to the original objects if I wish to. Is there somewhere that 
documents using Catalog and PluginIndexes without all of the other Zope 
stuff? Any documents on using it with the Zope stuff ?

Nic


 hth,

 -Casey

 On Wednesday 29 May 2002 04:05 pm, Nicholas Henke wrote:
  Hello~~
  I am playing with using the Catalog class in ZCatalog along with

 CatalogQuery

  to create a generic object layer on top of ZODB. I can index and search
  til

 I

  am blue in the face, and I always get the correct answers. Now for the
  problems...
 
  Say I have the following obj:
  class test(Persistent):
  variable = 1
  def function(self):
  print self.__dict__
 
  now if I do:
  catalog = Catalog()
  catalog.addIndex('variable', Fieldindex('variable'))
  catalog.addColumn('variable')
  obj = test()
  catalog.catalogObject(obj, id(obj))
 
  catalog_query = CatalogQuery(catalog, variable==1)
  results = catalog_query()
  for r in results:
  print r.variable  # ok
  print r.getRID() # ok
  print r.function # NameError
 
  ...so I can get an object (a mybrains instance )back that allows me to
  print r.variable, but I cannot get r.function().
  How does one do this? Is there a mapping between RIDs in the catalog and

 real

  objects somewhere? Do I need to do that mapping in an IOBtree (it would
  make the most sense since I am using id(obj) as the uid in the catalog)?
  Is there somewhere in Zope/google/web that does this?
 
  Thanks for any help!!
  Nic
 
 
 
  ___
  Zope-Dev maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope-dev
  **  No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope )



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZODB, Catalog and actually using it

2002-05-29 Thread Casey Duncan

[removed zodb-dev, don't cross post!]

If you are using plain catalogs then you need to store the path to the object 
somewhere (as metadata or as Zope does as the uid of the catalog record). 
Then traverse to it based on this path. In Zope you use (restrictedTraverse 
(or unrestrictedTraverse) to do this). You might need to roll your own 
traverser, but it shouldn't be too hard.

hth,

Casey

On Wednesday 29 May 2002 04:30 pm, Nicholas Henke wrote:
 On Wednesday 29 May 2002 04:20 pm, Casey Duncan wrote:
  try:
 
ob = r.getObject()
ob.function()
 
 ob gets returned as None -- I think this is due to 
 AbstractCatalogBrain::getObject(). I don't believe self.aq_parent is set 
 correctly -- how is it supposed to be set ?
 
 
  or if that doesn't work:
 
ob = catalog.getobject(r.data_record_id_)
 AttributeError -- getobject doesnt exist?
 
ob.function()
 
  Bear in mind that getObject traverses to the object which is expensive 
both
  in time and memory if the number of results is large.
 
 OK -- is there a better way to do all of this ?  What I am trying to do is 
 have ZODB store objects and Catalog maintain indexes on them. Now I can come 
 back and do a 'SELECT' on the objects, say for variable != 1, and somehow 
get 
 access to the original objects if I wish to. Is there somewhere that 
 documents using Catalog and PluginIndexes without all of the other Zope 
 stuff? Any documents on using it with the Zope stuff ?
 
 Nic


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZODB thread safety issue.

2002-03-11 Thread Toby Dickenson

On Sun, 10 Mar 2002 11:52:24 +0100 (CET), Romain Slootmaekers
[EMAIL PROTECTED] wrote:

This explains the problems we have with our system:
we have a multithreaded system where each thread iteratese over a set of
objects in the ZODB, and sees of something needs to be done... if so the
thread does it. Now since each thread gets its own version of the object.
our actions occur multiple times... 

I suggest one thread that scans the database. when it finds some work
to be done it adds a specification of the work into a work queue.
Seperate worker threads get thier work specification from the queue.

Exactly how you store the work queue depends on other factors, but I
suggest not in ZODB.

Toby Dickenson
[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZODB thread safety issue.

2002-03-10 Thread Dieter Maurer

Romain Slootmaekers writes:
  Is there a way we can share the access to the objects, or do we have to
  create a global lock ? And if we have to create a global lock, what's the
  desired/standard approach in doing so.
You may have a look at SharedResource at

  http://www.dieter.handshake.de/pyprojects/zope



Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZODB Couldn't load state (Berkeley DB 2..7.7)

2001-03-16 Thread Chris McDonough

Ping... eek.  Do you have a backup?  There are no recovery utilities for
BerkeleyStorage AFIAK.

- Original Message -
From: "Ping Lau" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 17, 2001 3:55 AM
Subject: [Zope-dev] ZODB Couldn't load state (Berkeley DB 2..7.7)


 I have been using Berkeley DB 2.7.7 as main Zope Storage for about 3
months
 now.  I am running Zope 2.2.4.  Everything was fine yesterday.  This
morning
 I tried to access a ZClass (base class ZObjectManager), which contains
about
 2,000 objects, I got

 ERROR(200) ZODB Couldn't load state for '\000\000\000\000\000\000\026\351'
 Traceback (innermost last):
 File /usr/local/zope/2-2/lib/python/ZODB/Connection.py, line 448, in
 setstate cPickle.UnpicklingError: invalid load key, ''.

 Other than this ZClass, I can access other objects just fine.  I tried
Ty's
 tranalyzer.  But it gave me "error: Not a .fs file (at least, not a kind I
 know about)".

 How can I recover the 2,000 objects?

 Regards,
 Ping


 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZODB, Threads and Persistence

2000-11-10 Thread Chris McDonough

AFAIK, you should be able to spawn a new thread from within any function
within Zope and manipulate stuff in the ZODB as long as you lock properly.
The number of database connections is fixed, but arbitrary threads can take
up a database connection on  an ad-hoc basis.  If I were you, I'd mess
around a little bit by spawning threads within a Product, and causing the
thread to manipulate ZODB objects, keeping locking in mind.  I've done this
on a limited basis and it seems to work.

Specifically, an object may be "ghosted" if it hasn't been accessed in a
while.  That doesn't mean its state goes away, it just means that it needs
to reload its state when it's accessed again.  Your manipulation of the
object in a separate thread should prevent the object from being ghosted.

- Original Message -
From: "Magnus Heino (Rivermen)" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 10, 2000 10:35 AM
Subject: [Zope-dev] ZODB, Threads and Persistence



 Hi.

 Reading from Jims 'Introduction to the Zope Database':

 "An object's state may be freed at any time by the ZODB to conserve memory
 usage."

 What does this mean? That the object can be freed even though there are
 references to it?

 The reason I'm asking is becase I want to use threads and persistence
 together.

 I would like to inherit both threading.Thread and Persistence.Persistent,
 but that gives an error. I guess thats because of the ExtentionClass.

 However, if i only inherit Persistence.Persistent and starts a thread
using
 the thread module withing the persistent class, what will happen with it?
 Can the ZODB still decide to free my persistent object even thoght it has
a
 reference to a thread that is running??

 Or can I start my thread when the object first is used, and rely on that
it
 will be running until I stop it or remove any reference to it?


 /Magnus


 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] ZODB, Threads and Persistence

2000-11-10 Thread Magnus Heino


 AFAIK, you should be able to spawn a new thread from within any
function
 within Zope and manipulate stuff in the ZODB as long as you lock
properly.

I guess I wasn't clear enough, but my application isnt within zope, im
just using zodb and some more components out of it.


 Specifically, an object may be "ghosted" if it hasn't been accessed
in a
 while.  That doesn't mean its state goes away, it just means that it
needs
 to reload its state when it's accessed again.  Your manipulation of
the
 object in a separate thread should prevent the object from being
ghosted.

But I guess this still will be the same anyway. That is, if an object
inhereted from Persistence.Persistance spawns a thread that
manipulated data in the object, I will have no problems. The thread
will be running just fine, and the data will be stored in the zodb.

?

/Magnus
 
 - Original Message -
 From: "Magnus Heino (Rivermen)" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, November 10, 2000 10:35 AM
 Subject: [Zope-dev] ZODB, Threads and Persistence
 
 
 
  Hi.
 
  Reading from Jims 'Introduction to the Zope Database':
 
  "An object's state may be freed at any time by the ZODB to
conserve memory
  usage."
 
  What does this mean? That the object can be freed even though
there are
  references to it?
 
  The reason I'm asking is becase I want to use threads and
persistence
  together.
 
  I would like to inherit both threading.Thread and
Persistence.Persistent,
  but that gives an error. I guess thats because of the
ExtentionClass.
 
  However, if i only inherit Persistence.Persistent and starts a
thread
 using
  the thread module withing the persistent class, what will happen
with it?
  Can the ZODB still decide to free my persistent object even thoght
it has
 a
  reference to a thread that is running??
 
  Or can I start my thread when the object first is used, and rely
on that
 it
  will be running until I stop it or remove any reference to it?
 
 
  /Magnus
 
 
  ___
  Zope-Dev maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope-dev
  **  No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope )
 
 
 

--

/Magnus Heino

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] ZODB, Threads and Persistence

2000-11-10 Thread Chris McDonough

 But I guess this still will be the same anyway. That is, if an object
 inhereted from Persistence.Persistance spawns a thread that
 manipulated data in the object, I will have no problems. The thread
 will be running just fine, and the data will be stored in the zodb.

This is how I've experienced it.  :-)


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] ZODB optimization

2000-09-20 Thread Jim Fulton

[EMAIL PROTECTED] wrote:
 
 I'm wondering, is the ZODB easily 'fragmented' or .. un-optimized ?
 If so, are there any tools/functions that will 'unfragment' / optimize
 it?

This really depends on the undelying storage used.  

 Does the 'pack database' in the Administration menu do this? 

Packing does two things:

  - It removed records for objects that are no longer referenced
(as of the pack time), or, IOW, it doesm garbage collection.

  - For storages that support undo (and time travel), it also
removes records that were not current as of the pack time.

Both of these, especially the latter are a little bit similar to 
defragmentation or optimization. In addition, the particular storage
implementation may have other issues/tools. For example, if the
Oracle storage is used, them whatever fragmentation or optimization
issues or adminstration tools provided by Oracle apply.

 If so,
 it could be a Good Thing (tm) to have separate optimize and packing
 (history deletion etc.) functions (buttons).

This doesn't really apply. 
 
 Is there any way to make an object not keep history on itself or on
 contained objects ?

Currently, the only way to do this is with a non-versioning storage, 
such as the Berkely DB storage.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
Technical Director   (888) 344-4332http://www.python.org  
Digital Creationshttp://www.digicool.com   http://www.zope.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] ZODB....

2000-07-26 Thread Toby Dickenson

On Tue, 25 Jul 2000 18:07:06 +0200, [EMAIL PROTECTED] wrote:

I want to develop an external program that can store and retrieve 
an Object (such as a Person) in the ZoDB

That sounds a bit cruel.

I tried the example that I found in the How to's but it doesn't works  
In fact, I have the following message :
ZODB.FileStorage(file) 
attribute Error : FileStorage

--But I have imported ZODB

And, when I try to import ZODB.FileStorage : the program stops with the 
following message :
TypeError : call of non-function type 

what's wrong ?

You are trying to call an object, and that object is not callable.

Normally that error message should include the name of the type of the
object that is being abused

 "hello"()
Traceback (innermost last):
  File "stdin", line 1, in ?
TypeError: call of non-function (type string)

Either you truncated the message when you posted the message, or there
is something strange with the object's type.

Unless you are using a pre-release python 1.6 or 2.0 - If so the name
of your type might not get printed if it is unicode


Toby Dickenson
[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] ZODB....

2000-07-26 Thread Carlos Neves

On Tue, 25 Jul 2000, [EMAIL PROTECTED] wrote:
 Hi, 
 
 I want to develop an external program that can store and retrieve 
 an Object (such as a Person) in the ZoDB
 I tried the example that I found in the How to's but it doesn't works  
 In fact, I have the following message :
 ZODB.FileStorage(file) 
 attribute Error : FileStorage
 
 --But I have imported ZODB
 
 And, when I try to import ZODB.FileStorage : the program stops with the 
 following message :
 TypeError : call of non-function type 
 
 what's wrong ?
 
 did Anybody have an example like this... ? 
 Can anybody help me ?
 

Start by doing this:

import ZODB.FileStorage

ref = ZODB.FileStorage.FileStorage('YourData.fs')


and take it from here...
-- 
"Sometimes I think the surest sign that intelligent life exists elsewhere
in the Universe is that none of it has tried to contact us."

Carlos Neves
[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] ZODB : store and retrieve (more specific)

2000-07-25 Thread Johan Carlsson



 Hi, 
 
 
 I want to create a persistent List (I want to store data for a long time 
 without using a relational database). I have found source of such list but 
 I don't know how to use it. 
 
 The things that I want to know are : 
 -- how could I use personnal object (in Python language)
 -- how could I store and retrieve these object ?
 
 I Hope that anybody can help me thanks...


You can either use the PersistentMapping object that comes with Zope 
"from ZODB.PersistentMapping import PersistentMapping" or 
AndrewWilcox's http://www.zope.org/Members/AndrewWilcox/PersistentListDict. 
PersistentMapping is limited to string keys only, which is sufficient most of the 
time. 
Just create a PersistentMapping in your Zope class and use it as if it was 
a regular python dictionary. PersistentMapping takes care of setting 
the necessary attributes for it to be persistent.

Alternative you can use a TinyTable directly in Zope for storing a table.

Regards,
Johan Carlsson







___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] ZODB : mystery

2000-07-24 Thread Chris Withers

Every time you create a Zope object, such as a DTML document or Folder,
it gets stored in the ZODB. Perhaps you could be a little more specific
in your aims?

cheers,

Chris

[EMAIL PROTECTED] wrote:
 
 Hi,
 
 I've a question : How could I store and retrieve object in the ZoDB ?
 I know that I must create a persistent object.
 
 thanks in advance .
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )