Description

xapian index build is broken in 1.9 because self.request.finish is gone.

Component selection

Details

MoinMoin Version

1.9

OS and Version

Python Version

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

Discussion

That's a first idea how to fix it.

Method update(self, *args, **kw) inherited from werkzeug.datastructures.UpdateDictMixin

   1 diff -r e17387246649 MoinMoin/search/builtin.py                                                                                                                 
   2 --- a/MoinMoin/search/builtin.py        Mon Apr 06 12:31:18 2009 +0200                                                                                          
   3 +++ b/MoinMoin/search/builtin.py        Sun Apr 12 23:13:29 2009 +0200                                                                                          
   4 @@ -290,7 +290,7 @@
   5                  indexThread.join()
   6              return func
   7 
   8 -        self.request.finish = joinDecorator(self.request.finish)
   9 +        self.request.session.update = joinDecorator(self.request.session.update)
  10          indexThread.start()
  11 
  12      def _index_pages(self, request, files=None, mode='update'):
  13 @@ -351,7 +351,7 @@
  14                      indexThread.join()
  15                  return func
  16 
  17 -            self.request.finish = joinDecorator(self.request.finish)
  18 +            self.request.session.update = joinDecorator(self.request.session.update)
  19              indexThread.start()
  20          except:
  21              self.lock.release()

2009-04-27T22:00:19  <dreimark> LotekThirteen: you can test my patch for that problem
2009-04-27T22:01:12  <dreimark> LotekThirteen: http://moinmo.in/MoinMoinBugs/1.9_xapian_request.finish

* Investigation into the Finish method from 1.8 showed that it was running right at the end of the run() method of the application

* The reason for this was to ensure that a new thread is started and processing continued. However the thread needs to be joined right at the end

* The finish method was removed in 1.9 so we have re-added the finish method to the context with a dummy method that does nothing.

* The indexing thread can now continue to operate as it did before and the finish method is called at the end of the application run method.

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/1.9_xapian_request.finish (last edited 2009-07-03 14:55:06 by AndyDawkins)