incubator-wave-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pablo Ojanguren <pablo...@gmail.com>
Subject Re: How to migrate deltas from file to mongoDB storage
Date Sun, 20 Jul 2014 21:08:40 GMT
My apologise, I've checkout my local repo when I have the fix. I don't know
if Yuri can push the fix himself or if he needs a patch from me.

Thank you again!


2014-07-20 22:29 GMT+02:00 Ben Hegarty <hegsie@gmail.com>:

> hmm thats odd as I keep having to patch this change in when I pull from
> wave master...
>
> here's master currently, and the return value isn't used can we confirm
> that the correct patch got applied?
>
> line 140 should read ... *waveletDelta =
> MongoDbDeltaStoreUtil.deserializeWaveletDeltaRecord(result);*
>
>  129   @Override
> 130   public WaveletDeltaRecord getDeltaByEndVersion(long version) throws
> IOException {
> 131     DBObject query = createWaveletDBQuery();
> 132
> query.put(MongoDbDeltaStoreUtil.FIELD_TRANSFORMED_RESULTINGVERSION_VERSION,
> version);
> 133
> 134     DBObject result = deltaDbCollection.findOne(query);
> 135
> 136     WaveletDeltaRecord waveletDelta = null;
> 137
> 138     if (result != null)
> 139     try {
> 140       *MongoDbDeltaStoreUtil.deserializeWaveletDeltaRecord(result);*
> 141     } catch (PersistenceException e) {
> 142       throw new IOException(e);
> 143     }
> 144     return waveletDelta;
> 145   }
>
>
> On Sun, Jul 20, 2014 at 8:17 PM, Pablo Ojanguren <pablojan@gmail.com>
> wrote:
>
> > Hi Ben, sorry I forgotten to answer you before. Yes, this bug was fixed
> in
> > the commit to the repo. I think you saw a non final revision of the
> patch.
> >
> > Thank you for remind it!
> >
> >
> > 2014-07-20 14:27 GMT+02:00 Ben Hegarty <hegsie@gmail.com>:
> >
> > > Hi Guys,
> > >
> > > Just curious if this has been fixed as you're now discussing doing a
> > > release and Mongodb support seems to be a headline feature of the
> release
> > > and without this patch its slightly broken.
> > >
> > > Regards
> > >
> > >
> > > On Mon, Mar 3, 2014 at 5:57 PM, Ben Hegarty <hegsie@gmail.com> wrote:
> > >
> > > > just as an FYI there is a bug in the mongodb impl in the file
> > > > MongoDbDeltaCollection.java here...
> > > >
> > > >  129   @Override
> > > > 130   public WaveletDeltaRecord getDeltaByEndVersion(long version)
> > throws
> > > > IOException {
> > > > 131     DBObject query = createWaveletDBQuery();
> > > > 132
> > > >
> > >
> >
> query.put(MongoDbDeltaStoreUtil.FIELD_TRANSFORMED_RESULTINGVERSION_VERSION,
> > > > version);
> > > > 133
> > > > 134     DBObject result = deltaDbCollection.findOne(query);
> > > > 135
> > > > 136     WaveletDeltaRecord waveletDelta = null;
> > > > 137
> > > > 138     if (result != null)
> > > > 139     try {
> > > > *140
> > MongoDbDeltaStoreUtil.deserializeWaveletDeltaRecord(result);*
> > > > 141     } catch (PersistenceException e) {
> > > > 142       throw new IOException(e);
> > > > 143     }
> > > > 144     return waveletDelta;
> > > > 145   }
> > > >
> > > > that may cause issues, the deserialised record doesn't actually get
> > > > returned.  Once I fixed the mongodb unit tests, I found it.
> > > >
> > > > Regards
> > > > Ben
> > > >
> > > >
> > > > On Mon, Mar 3, 2014 at 5:02 PM, Pablo Ojanguren <pablojan@gmail.com>
> > > > wrote:
> > > >
> > > >> Great whether import/export tools are realiable. I will perform test
> > > too.
> > > >>
> > > >> Thanks
> > > >>
> > > >>
> > > >> 2014-03-03 17:59 GMT+01:00 Yuri Z <vega113@gmail.com>:
> > > >>
> > > >> > I guess it might work. I ll try it out.
> > > >> > On Mar 3, 2014 6:53 PM, "Pablo Ojanguren" <pablojan@gmail.com>
> > wrote:
> > > >> >
> > > >> > > Hi,
> > > >> > >
> > > >> > > I wonder if we could use existing delta export/import utilities
> to
> > > >> > perform
> > > >> > > such migration. These would be the steps to perform:
> > > >> > >
> > > >> > > 1) Run export utility and get a full backup of deltas
> > > >> > > 2) Change server configuration to use mongoDB for delta
> > persistence
> > > >> > > 3) Run import utility with previous backup files
> > > >> > >
> > > >> > >
> > > >> > > Does anyone see any pitfall or risk in this approach?
> > > >> > >
> > > >> > > Thank you.
> > > >> > >
> > > >> >
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > Regards
> > > > Ben
> > > >
> > >
> > >
> > >
> > > --
> > > Regards
> > > Ben
> > >
> >
>
>
>
> --
> Regards
> Ben
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message