Echo4190 / alliancep2pbeta

Automatically exported from code.google.com/p/alliancep2pbeta
0 stars 0 forks source link

1.2.0-pre: Alliance data loss on abnormal shutdown #114

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. A power outage or an abnormal shutdown.
2. A folder scheduled for download does not continue downloading upon restart.

What is the expected output? What do you see instead?
This problem is almost regarding anything in Alliance. Wheither there are new 
chat messages, friend connects with new IP, you make config changes etc. 
Alliance peridically dumping data to disk has proven to be a not so trustworthy 
method.

I expect Alliance to dump i.e. download queue, connection info, settings, chat 
messages or whatever the moment there are changes recorded. This makes Alliance 
write data to disk more often, but the low amount of data that is being written 
to disk should not be a problem.

What version of the product are you using? On what operating system?
1.2.0-pre Windows 7 x86

Original issue reported on code.google.com by info%tim...@gtempaccount.com on 22 Jul 2010 at 10:27

GoogleCodeExporter commented 8 years ago
I agree, the periodical data dump to disk is an issue.

Original comment by davli...@gmail.com on 22 Jul 2010 at 10:30

GoogleCodeExporter commented 8 years ago
We cant do real time saving. That would cause loads of problems if you had a 
lot of friends and they where chatting in the chat room or PMing you. Bastvera 
will make a periodic save feature though to save all settings and logs ever xx 
mins.

Original comment by Deathfi...@gmail.com on 22 Jul 2010 at 2:34

GoogleCodeExporter commented 8 years ago
But how do other programs solve this. For instance using mIRC having chats 
being logged to file. These programs probably have a lot more text to dump to 
disk and still run fine. It's not the 90s anymore, I would understand that 
would cause a load on an old Amiga 500.But I mean harddrives today can easily 
write 170 000 000 characters to disk per second. Search times are milliseconds.

Watching the system resource monitor. I open up Google Chrome and browse the 
web. I can see that Chrome is constantly writing data to disk during my 
browsing. It is writing between 25000-50000 bytes per second and my system runs 
absolutely fine.

If this is a problem in the Java language, how about a queue? Queue all data 
that needs to be dumped to disk, and have a timer writing it (if there is any) 
every 10 seconds.

Original comment by info%tim...@gtempaccount.com on 22 Jul 2010 at 6:22

GoogleCodeExporter commented 8 years ago
Oh, I have spoken to a highly skilled programmer who is in the big coding 
business and he responds:

"The OS will be caching it anyways
so its okay to keep writing to disk
its the OS's responsibility to buffer up when needed"

So it should not be a problem.

He also knows Java so I told him Aneeded coders. But it can be hard work 
recruiting an already busy man.

Original comment by info%tim...@gtempaccount.com on 22 Jul 2010 at 6:41

GoogleCodeExporter commented 8 years ago
>"The OS will be caching it anyways
>so its okay to keep writing to disk
>its the OS's responsibility to buffer up when needed"
>
>So it should not be a problem.

It's not a caching problem, not I/O.

History chat is saved after every line so it's real time.
Chat lines from chat are leftovers of old code and will be moved to read last X 
lines directly from history so it will be rl time too.
Downloads are saved every 10 minutes.
Rest is saved on event or only on exit.

Periodic xx mins it's just proposition. It will be something between 10-30 
seconds. Lower value is waste of cycles, but if someone really want to have 
save every 1 second I can add simple set command to console.

Well I'm busy man too, sometimes I wonder how can I find time for Alliance 
because it's not even my 'child' and most of my free time is occupied by 
business stuff coding and sadly Alliance and my job coding doesn't overlap. 
Progress would be even 2x faster with only 1 more person :/ Most ppl who are 
trying get involved are scared after a week with Alliance code because it's not 
a 'notepad' and it's sad because most Issues are easy to resolve. But it's only 
little digression and it's glad to hear that you were looking for help. 

Original comment by Bastv...@gmail.com on 22 Jul 2010 at 8:33