mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
no complaints about memory if the database is empty
This commit is contained in:
parent
b846f585fa
commit
e072632a54
|
@ -134,8 +134,8 @@ public class Table implements Index, Iterable<Row.Entry> {
|
|||
this.table = null;
|
||||
}
|
||||
Log.logInfo("TABLE", "initialization of " + tablefile.getName() + ". table copy: " + ((this.table == null) ? "no" : "yes") + ", available RAM: " + (MemoryControl.available() / 1024L / 1024L) + "MB, needed: " + (neededRAM4table / 1024L / 1024L) + "MB, allocating space for " + records + " entries");
|
||||
final long neededRAM4index = 200L * 1024L * 1024L + records * (rowdef.primaryKeyLength + 4L) * 3L / 2L;
|
||||
if (!MemoryControl.request(neededRAM4index, true)) {
|
||||
final long neededRAM4index = 100L * 1024L * 1024L + records * (rowdef.primaryKeyLength + 4L) * 3L / 2L;
|
||||
if (records > 0 && !MemoryControl.request(neededRAM4index, true)) {
|
||||
// despite calculations seemed to show that there is enough memory for the table AND the index
|
||||
// there is now not enough memory left for the index. So delete the table again to free the memory
|
||||
// for the index
|
||||
|
|
Loading…
Reference in New Issue
Block a user