[freenet-dev] [freenet-cvs] r19567 - trunk/freenet/src/freenet/store

2008-04-30 Thread Matthew Toseland
On Wednesday 30 April 2008 19:34, Matthew Toseland wrote:
> On Saturday 26 April 2008 04:57, j16sdiz at freenetproject.org wrote:
> > Author: j16sdiz
> > Date: 2008-04-26 03:57:34 + (Sat, 26 Apr 2008)
> > New Revision: 19567
> > 
> > Modified:
> >trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
> > Log:
> > use FileChannel.read()/write() in BDBFS
> > 
> All good stuff, however:
> - Don't use allocateDirect() unless you plan to keep the returned ByteBuffer 
> around for a long time. They are immobile and therefore hard to garbage 
> collect.

Sorry... I should really queue my replies until I reach the end of the commit 
log. :|

> - ClosedChannelException, AsynchronousCloseException and 
> ClosedByInterruptException should be caught and cause a silent failure for a 
> smooth shutdown.
> 
This is however still valid.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080430/6da2f56d/attachment.pgp>


[freenet-dev] [freenet-cvs] r19596 - trunk/freenet/src/freenet/node

2008-04-30 Thread Matthew Toseland
On Monday 28 April 2008 17:59, nextgens at freenetproject.org wrote:
> Author: nextgens
> Date: 2008-04-28 16:59:25 + (Mon, 28 Apr 2008)
> New Revision: 19596
> 
> Modified:
>trunk/freenet/src/freenet/node/KeyTracker.java
> Log:
> ditto
> 
> Modified: trunk/freenet/src/freenet/node/KeyTracker.java
> ===
> --- trunk/freenet/src/freenet/node/KeyTracker.java2008-04-28 16:57:21 UTC 
(rev 19595)
> +++ trunk/freenet/src/freenet/node/KeyTracker.java2008-04-28 16:59:25 UTC 
(rev 19596)
> @@ -728,7 +728,7 @@
>  return acks;
>  }
>  
> - public void requeueForgot(int[] forgotPackets, int start, int length) {
> + public synchronized void requeueForgot(int[] forgotPackets, int start, 
> int 
length) {

Why?

>   synchronized(forgottenQueue) { // It doesn't do anything else 
> does it? 
REDFLAG
>   for(int i=start;i<start+length;i++) {
>   queueForgotten(i, false);
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080430/bd8caa76/attachment.pgp>


[freenet-dev] [freenet-cvs] r19589 - trunk/freenet/src/freenet/node

2008-04-30 Thread Matthew Toseland
On Monday 28 April 2008 17:17, nextgens at freenetproject.org wrote:
> Author: nextgens
> Date: 2008-04-28 16:17:10 + (Mon, 28 Apr 2008)
> New Revision: 19589
> 
> Modified:
>trunk/freenet/src/freenet/node/PeerManager.java
> Log:
> Fix a deadlock in PeerManager: writePeersInner will request PeerNode.this 
*but* the calling thread might not have it

We don't really want to hold the PeerManager lock while doing I/O now do we?

How did this deadlock work?
> 
> Modified: trunk/freenet/src/freenet/node/PeerManager.java
> ===
> --- trunk/freenet/src/freenet/node/PeerManager.java   2008-04-28 15:45:40 UTC 
(rev 19588)
> +++ trunk/freenet/src/freenet/node/PeerManager.java   2008-04-28 16:17:10 UTC 
(rev 19589)
> @@ -1008,6 +1008,7 @@
>  }
>  
>  private void writePeersInner() {
> + synchronized(this) {
>   synchronized(writePeersSync) {
>   if(darkFilename != null)
>   writePeersInner(darkFilename, getDarknetPeers());
> @@ -1018,6 +1019,7 @@
>   writePeersInner(om.getOldPeersFilename(), 
> om.getOldPeers());
>   }
>   }
> + }
>  }
>  
>  /**
> 
> ___
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
> 
> 
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080430/07871e1d/attachment.pgp>


[freenet-dev] [freenet-cvs] r19567 - trunk/freenet/src/freenet/store

2008-04-30 Thread Matthew Toseland
On Saturday 26 April 2008 04:57, j16sdiz at freenetproject.org wrote:
> Author: j16sdiz
> Date: 2008-04-26 03:57:34 + (Sat, 26 Apr 2008)
> New Revision: 19567
> 
> Modified:
>trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
> Log:
> use FileChannel.read()/write() in BDBFS
> 
All good stuff, however:
- Don't use allocateDirect() unless you plan to keep the returned ByteBuffer 
around for a long time. They are immobile and therefore hard to garbage 
collect.
- ClosedChannelException, AsynchronousCloseException and 
ClosedByInterruptException should be caught and cause a silent failure for a 
smooth shutdown.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080430/0c10bbb3/attachment.pgp>


[freenet-dev] Mac using volunteers needed!

2008-04-30 Thread Matthew Toseland
Could anyone who has access to a MacOS/X box please contact us? We need to 
test the new startup script for the installer, so that when we release 0.7.0, 
it will work out of the box even with a reboot (like it does on windows).
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080430/de217a19/attachment.pgp>


[freenet-dev] Config page usability

2008-04-30 Thread David ‘Bombe’ Roden
On Tuesday 29 April 2008 23:33:59 Matthew Toseland wrote:

> IMHO there is a difference between a geek who knows what an IP address is,
> and an experienced freenet user.

Duh, nobody doubts that. But most of the people using freenet will probably 
think "why should I only look at the medium settings when I can also look at 
the advanced settings" and act accordingly. It makes the people feel more 
clever. They like that.

That's why I think that the medium settings page is pretty much a waste of 
time.


David
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080430/440ed741/attachment.pgp>


[freenet-dev] Config page usability

2008-04-30 Thread Matthew Toseland
On Tuesday 29 April 2008 23:37, David ?Bombe? Roden wrote:
> On Tuesday 29 April 2008 23:33:59 Matthew Toseland wrote:
> 
> > IMHO there is a difference between a geek who knows what an IP address is,
> > and an experienced freenet user.
> 
> Duh, nobody doubts that. But most of the people using freenet will probably 
> think "why should I only look at the medium settings when I can also look at 
> the advanced settings" and act accordingly. It makes the people feel more 
> clever. They like that.
> 
> That's why I think that the medium settings page is pretty much a waste of 
> time.

Well, the main purpose for the medium settings page is to have the small 
number of settings that are useful to the average geek easily visible and not 
hidden amongst the large number of advanced options. To try to minimise the 
number of people who come to us asking how to open fproxy to their LAN.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080430/3aa65744/attachment.pgp>


[freenet-dev] Mac using volunteers needed!

2008-04-30 Thread Matthew Toseland
Could anyone who has access to a MacOS/X box please contact us? We need to 
test the new startup script for the installer, so that when we release 0.7.0, 
it will work out of the box even with a reboot (like it does on windows).


pgpS71IYXUp1t.pgp
Description: PGP signature
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] [freenet-cvs] r19567 - trunk/freenet/src/freenet/store

2008-04-30 Thread Matthew Toseland
On Saturday 26 April 2008 04:57, [EMAIL PROTECTED] wrote:
 Author: j16sdiz
 Date: 2008-04-26 03:57:34 + (Sat, 26 Apr 2008)
 New Revision: 19567
 
 Modified:
trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
 Log:
 use FileChannel.read()/write() in BDBFS
 
All good stuff, however:
- Don't use allocateDirect() unless you plan to keep the returned ByteBuffer 
around for a long time. They are immobile and therefore hard to garbage 
collect.
- ClosedChannelException, AsynchronousCloseException and 
ClosedByInterruptException should be caught and cause a silent failure for a 
smooth shutdown.


pgpTyDDd41dYP.pgp
Description: PGP signature
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] [freenet-cvs] r19589 - trunk/freenet/src/freenet/node

2008-04-30 Thread Matthew Toseland
On Monday 28 April 2008 17:17, [EMAIL PROTECTED] wrote:
 Author: nextgens
 Date: 2008-04-28 16:17:10 + (Mon, 28 Apr 2008)
 New Revision: 19589
 
 Modified:
trunk/freenet/src/freenet/node/PeerManager.java
 Log:
 Fix a deadlock in PeerManager: writePeersInner will request PeerNode.this 
*but* the calling thread might not have it

We don't really want to hold the PeerManager lock while doing I/O now do we?

How did this deadlock work?
 
 Modified: trunk/freenet/src/freenet/node/PeerManager.java
 ===
 --- trunk/freenet/src/freenet/node/PeerManager.java   2008-04-28 15:45:40 UTC 
(rev 19588)
 +++ trunk/freenet/src/freenet/node/PeerManager.java   2008-04-28 16:17:10 UTC 
(rev 19589)
 @@ -1008,6 +1008,7 @@
  }
  
  private void writePeersInner() {
 + synchronized(this) {
   synchronized(writePeersSync) {
   if(darkFilename != null)
   writePeersInner(darkFilename, getDarknetPeers());
 @@ -1018,6 +1019,7 @@
   writePeersInner(om.getOldPeersFilename(), 
 om.getOldPeers());
   }
   }
 + }
  }
  
  /**
 
 ___
 cvs mailing list
 [EMAIL PROTECTED]
 http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
 
 


pgpKd2Dr4jsWu.pgp
Description: PGP signature
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] [freenet-cvs] r19596 - trunk/freenet/src/freenet/node

2008-04-30 Thread Matthew Toseland
On Monday 28 April 2008 17:59, [EMAIL PROTECTED] wrote:
 Author: nextgens
 Date: 2008-04-28 16:59:25 + (Mon, 28 Apr 2008)
 New Revision: 19596
 
 Modified:
trunk/freenet/src/freenet/node/KeyTracker.java
 Log:
 ditto
 
 Modified: trunk/freenet/src/freenet/node/KeyTracker.java
 ===
 --- trunk/freenet/src/freenet/node/KeyTracker.java2008-04-28 16:57:21 UTC 
(rev 19595)
 +++ trunk/freenet/src/freenet/node/KeyTracker.java2008-04-28 16:59:25 UTC 
(rev 19596)
 @@ -728,7 +728,7 @@
  return acks;
  }
  
 - public void requeueForgot(int[] forgotPackets, int start, int length) {
 + public synchronized void requeueForgot(int[] forgotPackets, int start, 
 int 
length) {

Why?

   synchronized(forgottenQueue) { // It doesn't do anything else 
 does it? 
REDFLAG
   for(int i=start;istart+length;i++) {
   queueForgotten(i, false);


pgpARvKjacmtm.pgp
Description: PGP signature
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] [freenet-cvs] r19567 - trunk/freenet/src/freenet/store

2008-04-30 Thread Matthew Toseland
On Wednesday 30 April 2008 19:34, Matthew Toseland wrote:
 On Saturday 26 April 2008 04:57, [EMAIL PROTECTED] wrote:
  Author: j16sdiz
  Date: 2008-04-26 03:57:34 + (Sat, 26 Apr 2008)
  New Revision: 19567
  
  Modified:
 trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
  Log:
  use FileChannel.read()/write() in BDBFS
  
 All good stuff, however:
 - Don't use allocateDirect() unless you plan to keep the returned ByteBuffer 
 around for a long time. They are immobile and therefore hard to garbage 
 collect.

Sorry... I should really queue my replies until I reach the end of the commit 
log. :|

 - ClosedChannelException, AsynchronousCloseException and 
 ClosedByInterruptException should be caught and cause a silent failure for a 
 smooth shutdown.
 
This is however still valid.


pgpq2sGMwQfFj.pgp
Description: PGP signature
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Re: [freenet-dev] [freenet-cvs] r19567 - trunk/freenet/src/freenet/store

2008-04-30 Thread Daniel Cheng
On Thu, May 1, 2008 at 4:50 AM, Matthew Toseland
[EMAIL PROTECTED] wrote:
 On Wednesday 30 April 2008 19:34, Matthew Toseland wrote:
   On Saturday 26 April 2008 04:57, [EMAIL PROTECTED] wrote:
Author: j16sdiz
Date: 2008-04-26 03:57:34 + (Sat, 26 Apr 2008)
New Revision: 19567
   
Modified:
   trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
use FileChannel.read()/write() in BDBFS
   
   All good stuff, however:
   - Don't use allocateDirect() unless you plan to keep the returned 
 ByteBuffer
   around for a long time. They are immobile and therefore hard to garbage
   collect.

  Sorry... I should really queue my replies until I reach the end of the commit
  log. :|


   - ClosedChannelException, AsynchronousCloseException and
   ClosedByInterruptException should be caught and cause a silent failure for 
 a
   smooth shutdown.
  
  This is however still valid.


fixed in r19641
ClosedChannelException is the super class of other two.
___
Devl mailing list
Devl@freenetproject.org
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl