Mass_parse: Fix lnki_temp merger ending prematurely

pull/620/head
gnosygnu 8 years ago
parent 9ea81f3b26
commit 6b0dcffbca

@ -33,7 +33,7 @@ public class Xoa_app_ {
} }
public static final String Name = "xowa"; public static final String Name = "xowa";
public static final int Version_id = 512; public static final int Version_id = 512;
public static final String Version = "4.1.0.1701"; // RELEASE:2017-01-03 20:30 public static final String Version = "4.0.1.1701"; // RELEASE:2017-01-03 20:30
public static String Build_date = "2012-12-30 00:00:00"; public static String Build_date = "2012-12-30 00:00:00";
public static String Build_date_fmt = "yyyy-MM-dd HH:mm:ss"; public static String Build_date_fmt = "yyyy-MM-dd HH:mm:ss";
public static String Op_sys_str; public static String Op_sys_str;

@ -48,14 +48,10 @@ class Xomp_make_lnki {
while (true) { while (true) {
// load rows // load rows
Gfo_usr_dlg_.Instance.Prog_many("", "", "merging rows; bgn_uid=~{0} end_uid=~{1}", cur_xomp_uid, cur_xomp_uid + uid_count); Gfo_usr_dlg_.Instance.Prog_many("", "", "merging rows; bgn_uid=~{0} end_uid=~{1}", cur_xomp_uid, cur_xomp_uid + uid_count);
int tmp_xomp_uid_max = -1; // maximum uid for a grp of wkrs; EX: looping over 8 wkrs with xomp_uid range of 1 - 1000; max xomp_uid may only be 990 b/c pages are missing / failed
for (int i = 0; i < wkr_count; ++i) { for (int i = 0; i < wkr_count; ++i) {
Xomp_wkr_db src_wkr_db = src_mgr_dbs[i]; Xomp_wkr_db src_wkr_db = src_mgr_dbs[i];
int wkr_uid_max = tmp_xomp_uid_max;
for (Xomp_make_merger merger : merger_ary) for (Xomp_make_merger merger : merger_ary)
wkr_uid_max = merger.Merger__load(src_mgr_db, src_wkr_db, cur_xomp_uid, cur_xomp_uid + uid_count); merger.Merger__load(src_mgr_db, src_wkr_db, cur_xomp_uid, cur_xomp_uid + uid_count);
if (wkr_uid_max > tmp_xomp_uid_max)
tmp_xomp_uid_max = wkr_uid_max;
} }
// save rows // save rows
@ -63,8 +59,8 @@ class Xomp_make_lnki {
merger.Merger__save(); merger.Merger__save();
// NOTE: not ">=" else small wikis will fail with 0 images; EX:cs.q; DATE:2016-09-04 // NOTE: not ">=" else small wikis will fail with 0 images; EX:cs.q; DATE:2016-09-04
if (tmp_xomp_uid_max > max_xomp_uid || tmp_xomp_uid_max == -1) break; // if max_xomp_uid seen, break; note that ">" necessary because max_xomp_uid may not be in set of wkrs;
cur_xomp_uid += uid_count; // note that this sequentially counts up by uid_count (1000), so inevitable that cur_xomp_uid will exceed wkr_uid_max cur_xomp_uid += uid_count; // note that this sequentially counts up by uid_count (1000), so inevitable that cur_xomp_uid will exceed wkr_uid_max
if (cur_xomp_uid > max_xomp_uid) break; // if max_xomp_uid seen, break; note that ">" necessary because max_xomp_uid may not be in set of wkrs;
} }
// save rows // save rows

Loading…
Cancel
Save