._p_changed
B()
This prints:
False
4
False
False
Where I would expect True for the last two at least.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For more information a
with the same oid
have the same identity (that's the purpose of the "pickle cache" and
"_added" cache if you're interested in internals).
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTE
edits them and sends them back.
You can shorten that to
def __eq__(self, other):
return aq_base(self) is aq_base(other)
And you can ditch the aq_base if you don't use acquisition-based
classes.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59
e any way to get an object ID *before* an object has been
persisted?
You can call container._p_jar.add(yourobject) to have it get an oid
before commit time.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL
Chris Withers wrote:
Florent Guillaume wrote:
I can comment, I have a big brain too: the code in the catalog uses
per-connection series of keys, so no conflicts arise.
Really? I thought they were per-thread... wasn't aware that each thread
was tied to one connection indefinitely... I th
On 26 Jun 2006, at 15:12, Chris Withers wrote:
Florent Guillaume wrote:
This patch didn't seem to cure our Zope 2.8 afflicted with the
"assert end is not None" problem.
Florent,
Have you actually seen any problems from these errors?
I still see them occasionally, but they nev
On 26 Jun 2006, at 15:02, Chris Withers wrote:
Florent Guillaume wrote:
BTrees perform best when keys' prefixes are randomly distributed.
So if your application generates keys like 'foo001', 'foo002',...
you'll get lots of conflicts. Same for consecutive integ
esh() operation. Could you expand on the "it does
more than cache handling"? Invalidations being synchronous,
BTW do you have other patches in your local patched ZODB? I'm willing to
look at all of them and see if they can be integrated.
Thanks,
Florent
--
Florent Guillaume, Nuxeo
On 23 Jun 2006, at 17:55, Andreas Jung wrote:
--On 23. Juni 2006 17:51:35 +0200 Florent Guillaume <[EMAIL PROTECTED]>
wrote:
BTrees perform best when keys' prefixes are randomly distributed.
So if your application generates keys like 'foo001', 'foo002',...
flicts. Same for consecutive integers in IOBTree.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wik
r class designed for that (namely
BTrees), otherwise it's left up to the application to deal with it when
it receives a ConflictError.
So you're probably observing slowness in the frameworks on top of it.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+3
ort and in other connections on finish.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/W
l.zope.org/mailman/listinfo/zodb-dev
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-De
ng all values >= X is
then simply a matter of using the proper API on the reverse Tree (and it's
fast).
Florent
If someone with more knowledge of ZODB and the BTrees therein and bsddb
feels like confirming, correcting, or commenting on the above summary, and
options, that would be gre
# ZEO client cache, in bytes
# cache-size 20MB
# # Uncomment to have a persistent disk cache
# #client zeo1
#
#
Note the part about the persistent disk cache.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&am
Chris Withers wrote:
Florent Guillaume wrote:
base._p_changed=0
Marks the object not changed, to allow ghostifying.
base._p_deactivate()
Ghostifies the object.
base.__setstate__(state)
Updates the object's dict directly. This really shouldn
ilestorage somewhere and committing some transactions to it,
but that seems a little heavyweight...
You don't need any transactions to at least test this sequence, only the
Persistent base class and a dummy connection can be involved.
To really test the history yes of course you'll
e called for a readonly storage
(which the original code checks)?
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For more information about ZODB, see the ZODB Wiki
On 25 Apr 2006, at 15:23, Jim Fulton wrote:
Florent Guillaume wrote:
[Ccing zodb-dev]
On 25 Apr 2006, at 15:09, David Pratt wrote:
The protocol is simple yes, but the iteractions w.r.t threading
are sometimes subtle.
Hi Florent. This could be set up using a twisted's applic
e ZEO server.
For the ZEO server I don't see the point of changing it, it works well.
OTOH a ClientStorage has to integrate with the other servers in Zope,
and that's the one that would benefit from being moved to the twisted
event loop if twisted is used.
Florent
--
Florent Guillaum
iterating over all objects on any
storage?
Yes, such an API to iterate over all storage objects has been talked about
several times before, but never implemented.
It would be quite useful.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo
depends on it.
I'm sure it does now -- in part because the checkin comment mentioned
changing some methods that used to return both serial and tid to return only
the latter. It's certainly the case that the current ZEO cache only knows
about tids (and oids, versions and pickles -- n
de to know if it
would need to be modified, maybe the function names in the code are
misleading).
No, the pickle cache doesn't actually have anything to do with the pickle
protocol.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxe
ecause in fact in you current unit tests, you're testing much more,
including the ZODB mechanisms that detect concurrently modified objects in
different connections and regenerate old state from the database, etc. It's
not strictly needed (and is a lot of setup).
Florent
--
Florent Guil
esses without fear of conflict errors.
This is vital for zasync, and other similar asynchronous queuing problems.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
eedback welcome.
Some people have reported infinite loops starting zopectl debug, but
I haven't had time to dig.
Florent
zodb-oid-debug.z28.patch
Description: Binary data
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxe
nt code in add().
Florent
PS: I'll take the time in a few weeks to review the messages I posted
here and checkin changes for those who have received approval. But I
don't have the bandwidth right now.
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59
ut it
should.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev mailing li
On 9 Jan 2006, at 17:20, Fred Drake wrote:
On 1/9/06, Florent Guillaume <[EMAIL PROTECTED]> wrote:
My point is that the python logging levels are insufficiently fine
grained.
The python logging framework leaves room for numeric levels and
registering equivalent strings, and indeed ZO
On 9 Jan 2006, at 17:25, Andreas Jung wrote:
--On 9. Januar 2006 17:06:25 +0100 Florent Guillaume <[EMAIL PROTECTED]>
wrote:
My point is that the python logging levels are insufficiently fine
grained.
Sufficently enough for me.
"Sufficient for me" is not a good reason sor
registering equivalent strings, and indeed ZODB and zLOG have them
defined.
I want to use them.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For more information abou
s that are done on every request at
the trace level (as they were before the move to python's logging module),
I'm thinking of transaction logs here.
This leaves the 'debug' level free for application debugging.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CT
a new or existing connection linked to the multidatabase set
return anyjar.get_connection(self._getDBName())
along with a unit test.
But the code that's in 2.9.0 is just as effective.
Florent
Florent Guillaume wrote:
Ok I've dug deeper and now understand the problem. The ro
enty of Data.fs with more than 10GB.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis
Could folks have a look and tell me what they think of the proposed
patch? Actually it is my belief this is a concern of DB or Connection,
not MountedObject, and the code shouldn't be in MountedObject but that's
the easiest workaround for now.
Florent
Florent Guillaume wrote:
O
;ve just caught me on "thousands" but gave no comments on deletion of
connection instances... but this is the clue to the topic.
Even hundreds of ZODB connections is absurd.
Again, with 4 threads you should never get more than 4 Filestorage
connections plus 4 TemporaryStorage connections.
Flo
number of thread is usually small.
If you see many RDB connections, then it's a RDB problem and not a ZODB
problem. Something not releasing RDB connections quick enough, or
leaking RDB connections.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71
s historical code, etc.
I'll let specialistst of the multi-databases decide what to do :)
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For more informatio
akSet but still be in the
DB's connection pool WeakSet. I guess here lies the problem.
Also, I don't know why we don't observe this for FileStorage, maybe
something has a hard reference on it somewhere?
Florent
--
Florent Guillaume, Nuxeo
y default) implementations that retrieve and update an
instance's __dict__. BTrees.Length is a good example of a class that
overrides these methods, using an integer as "the state".
Plagiarism! ;)
http://mail.zope.org/pipermail/zodb-dev/2005-December/009560.html
Florent
--
Floren
s possible.
I certainly makes sense from a high level description, but the devil is in
the details. I'd be interested in looking at it if you code something.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PRO
e value.
Even cleaner IMHO would be to use new methods storage.loadRoot() and
storage.storeRoot() here instead of doing storage.load(storage.ROOT_OID,
...) etc. (And let storeRoot choose the initial serial instead of None).
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&
ead _invalidated.
# Normally, _invalidated is written by calling dict.update, which
# will execute atomically by virtue of the GIL. But some storage
# might generate oids where hash or compare invokes Python code. In
# that case, the GIL can't save us.
Florent
--
Florent Guillaume, Nuxeo (
age (think SQL) has internally other kinds
of identifiers, like autoincremented integer primary keys, and
several tables depending on object kind, I want to reuse its concepts
and pack them into an oid like 'footable_12345'.
Anyway thanks for the answers, I know in what dir
and would anyone be interested in seeing it removed.
I'm asking because I'm planning a pretty complex storage layer, which
would benefit from more complex OIDs (for instance bigger strings, or
tuples of (str, int)).
Thanks,
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
f the instance dictionary,
as described above. The second element is a dictionary with items
for each of the assigned slots.
"""
Other classes can specialise the methods, see for instance BTrees.Length.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of
t, it's been
mentionned many times on his list, and any cursory search in the code
reveals it.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For more inform
nge, but the process of getting it into
python seems a bit daunting from an outsiders perspective...)
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For more informa
it afterwards.
That would be a nice solution I think.
What would happen though if the post-transaction user code decided to
commit the transaction? Could that be made to work, for code that would
like to change persistent objects?
Florent
--
Florent Guillaume, Nuxeo (
nt to be *in* the
transaction. Email sending *definitely* wants to be transactional.
The only use case I can see where a post-commit hook would be useful is
the "audit logging" thing someone mentionned a few days ago.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Direct
hook ordering, which
should go in a new common subsystem just above ZODB.
For all our cases, I think Zope will suffice.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
of
higher level API we provide at the Zope level. Would an integer order be ok
there ? And where should the code go ?
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
_
re logical if doing obj._p_changed = True
unghostified the object and marked it as changed.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For more information a
solved issues with the ordering of event subscribers, where
the "order" argument would at least introduces some flexibility that we
don't have today.
I vote for keeping it in ZODB 3.5
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 7
Tim Peters wrote:
[Florent Guillaume]
Frankly I don't see the point of using bisect if you do a linear pass on
the list first. The original code was clearer and was faster.
If you had a "natural" way of getting the index, then why not. But anyway
this kind of hook list will
iler to see where the CPU
time is spent.
For the ConflictErrors, you'll have to isolate what objects they apply to
and understand who writes to them and causes conflict. I posted a patch on
this list 1-2 months ago to get more information off ReadConflictErrors to
identify objects.
Floren
x27;t see the point of using bisect if you do a linear pass on the
list first. The original code was clearer and was faster.
If you had a "natural" way of getting the index, then why not. But anyway
this kind of hook list will have only a few elements in it. Optimize later.
Florent
--
F
reserved by this method
If that's a concern, maybe it can be called order__ or something ? What's
the pythonic way to do this ?
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
Tim Peters wrote:
[Florent Guillaume]
To be clear, I'm interested in how the _p_jar happens on a new object
that's just been created. Basically if you do:
# folder is a persistent object that has a _p_jar
# folder.foo = Foo() # where Foo inherits from Persistent
# here folder.foo do
On 4 Aug 2005, at 22:11, Tim Peters wrote:
[Florent Guillaume]
What part of the transaction/persistence code sets the _p_jar of a
persistent object to that of its parent when the object is
assigned to a
persistent parent and transaction.commit(1) is called ?
I'm massively overl
Trying to understand some code...
What part of the transaction/persistence code sets the _p_jar of a
persistent object to that of its parent when the object is assigned
to a persistent parent and transaction.commit(1) is called ?
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO
Florent Guillaume <[EMAIL PROTECTED]> wrote:
> I think transaction/interfaces.py is wrong for IDataManager: commit()
> and abort() take an object as first argument, as seen in the calls
> from MultiObjectResourceAdapter.
>
> But maybe I'm confused by the di
I think transaction/interfaces.py is wrong for IDataManager: commit()
and abort() take an object as first argument, as seen in the calls
from MultiObjectResourceAdapter.
But maybe I'm confused by the different deprecated/current interfaces...
Florent
--
Florent Guillaume, Nuxeo (
://www.python.org/workshops/1996-11/
papers/Bobbase.html but I believe at least this part is obsolete.
Thanks,
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For
thing.
Yes, DeadlockDebugger is the better too to use when you have "B and I
but no A and E" :) It usually clears up what's happening very quickly.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTE
good thing ;)
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev
effect giving you its path.
There's a "print" that you can uncomment to see all objects loaded,
for fun and maybe profit ;)
Feedback welcome.
Florent
zodb-oid-debug.v2.patch
Description: Binary data
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&
s new features and probably
some incompatibilities. The safe course is to use 3.2.x.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
For more information about Z
de shows that _cache.open() has not been called, so there
is no _get method. But I didn't go further.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
___
ally happens when other pages are accessed (no
> pattern). Alternatively, a blank page is returned. No messages appear
> in the Zope or Plone error log.
Seeing that the tracebacks involve CMFFormController, it may be that
this product is abusing sessions and using them badly.
Florent
--
Fl
<[EMAIL PROTECTED]> wrote:
> I'm getting a ZODB.POSException.ReadConflictError on my Plone 2.0.5
> site (Zope 2.7.3, Python 2.3.4 on Mac OS X Server 10.3.9).
Upgrade Zope. There are known session-related problems in old versions.
Florent
--
Florent Guillaume, Nuxeo (Par
ne:
> +self._savepoints = {}
> +self._savepoints[ref] = self._savepoint_index
And also some dels.
So I'd say you meant to have None for the class attribute
initialization.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1
t? I'm not building 90% of my app logic on that, it's
really just an optimization to delay some things until the end of the
transaction.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
_
uot;
return [(hook, args, kws) for hook, args, kws in self._before_commit
if isintance(hook, class_)]
(Interfaces could probably be a better choice than classes.)
Or is it overengineering ? Maybe just a getBeforeCommitHooks that
returns self._before_commit ?
Florent
--
Florent Guill
No no, I was just worried about the inconsistency between the signature,
that has no 'subtransaction' arg, and the docstring that talks about one.
Florent
> This is a point that I didn't think of. However, I wonder if this
> will be a problem. Many old data managers seem to accept
g set to false.
> +
> + """
But there's not "subtransaction" flag for this method anymore.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
_
- http://www.simplistix.co.uk
> ___
> For more information about ZODB, see the ZODB Wiki:
> http://www.zope.org/Wikis/ZODB/
>
> ZODB-Dev mailing list - ZODB-Dev@zope.org
> http://mail.zope.org/mailman/listinfo/zodb-dev
>
C (rev
> 29967)
> @@ -1 +1 @@
> -2.4a2
> +2.4.0a3
I'm sure it's on purpose, but why isn't ZEO numbered the same way than
the rest of the ZODB (3.4.0a3 now) ?
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40
s, but I don't think we need this.)
>
>This hook is very simple to use an implement and, I think, addresses
>the requitement much more directly than implementing special data
>managers.
>
> Thoughts?
>
> Anyone up for implementing this (with a doctest, o
if you're using a checkout in the ZODB 3.2 line, but should work
in the ZODB 3.3, 3.4, and trunk lines. Passing "-B" to test.py causes
test.py to run "setup.py build_ext -i" first.
Indeed. Thanks to you and Sidnei.
Florent
--
Florent G
hat I'd like to do is test the one in
src/transaction/tests/test_transaction.py, that I'm in the process of
modifying...
As it is I do a setup.py build every time before I run the tests but I'd
like to do everything in place.
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
On 4 Apr 2005, at 21:07, Tim Peters wrote:
[Florent Guillaume]
Actually it can check txn.status to decide.
Are you sure? I don't see it. .status isn't changed until after
beforeCompletion() is called:
You're right, my mistake, sorry.
Florent
--
Florent Guillaume, Nuxeo (Paris
er
arranges to hold a strong reference to a OneShot instance until the current
transaction ends, then that part isn't an issue.
Why the weak refs? What does it help doing in the ZODB case?
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http:/
g special data
>managers.
>
> Thoughts?
>
> Anyone up for implementing this (with a doctest, of course)?
Yes I'll look at it.
Florent
> I'd like to get this into ZODB 3.4.
>
> Jim
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of
it is called (if the transaction is ACTIVE it's ok, otherwise it's
been called by abort() -- the fact that abort() calls it should probably
be documented).
But as Julien said we'll have to find another way using ZODB 3.2...
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Direc
85 matches
Mail list logo