projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added tests for bug #883 'Need an 'ignore' value for the z:type
[idzebra-moved-to-github.git]
/
index
/
zebraapi.c
diff --git
a/index/zebraapi.c
b/index/zebraapi.c
index
ccf5f3b
..
e2cf847
100644
(file)
--- a/
index/zebraapi.c
+++ b/
index/zebraapi.c
@@
-1,4
+1,4
@@
-/* $Id: zebraapi.c,v 1.245 2007-01-17 13:22:53 adam Exp $
+/* $Id: zebraapi.c,v 1.249 2007-02-24 17:05:40 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
Copyright (C) 1995-2007
Index Data ApS
@@
-143,8
+143,8
@@
ZebraHandle zebra_open(ZebraService zs, Res res)
zh->m_staticrank = 0;
zh->m_segment_indexing = 0;
zh->m_staticrank = 0;
zh->m_segment_indexing = 0;
- zh->busy_handler_func = 0;
- zh->busy_handler_data = 0;
+ zh->break_handler_func = 0;
+ zh->break_handler_data = 0;
default_encoding = res_get_def(zh->session_res, "encoding", "ISO-8859-1");
default_encoding = res_get_def(zh->session_res, "encoding", "ISO-8859-1");
@@
-1024,12
+1024,12
@@
void zebra_set_partial_result(ZebraHandle zh)
}
}
-ZEBRA_RES zebra_set_busy_handler(ZebraHandle zh,
- int (*f)(void *client_data, ZebraHandle zh),
- void *client_data)
+ZEBRA_RES zebra_set_break_handler(ZebraHandle zh,
+ int (*f)(void *client_data),
+ void *client_data)
{
{
- zh->busy_handler_func = f;
- zh->busy_handler_data = client_data;
+ zh->break_handler_func = f;
+ zh->break_handler_data = client_data;
return ZEBRA_OK;
}
return ZEBRA_OK;
}
@@
-1635,9
+1635,9
@@
int zebra_string_norm (ZebraHandle zh, unsigned reg_id,
\param seqno sequence number
val is one of:
\param seqno sequence number
val is one of:
- d=writing to shadow(dirty)
- o=no writing,
- c=commit
+ d=writing to shadow(shadow enabled); writing to register (shadow disabled)
+ o=reading only
+ c=commit (writing to register, reading from shadow, shadow mode only)
*/
static void zebra_set_state (ZebraHandle zh, int val, int seqno)
{
*/
static void zebra_set_state (ZebraHandle zh, int val, int seqno)
{
@@
-1716,7
+1716,7
@@
static void read_res_for_transaction(ZebraHandle zh)
v = res_get_prefix(zh->res, "openRW", group, "1");
zh->m_flag_rw = atoi(v);
v = res_get_prefix(zh->res, "openRW", group, "1");
zh->m_flag_rw = atoi(v);
- v = res_get_prefix(zh->res, "fileVerboseLimit", group, "100000");
+ v = res_get_prefix(zh->res, "fileVerboseLimit", group, "1000");
zh->m_file_verbose_limit = atoi(v);
}
zh->m_file_verbose_limit = atoi(v);
}
@@
-1775,6
+1775,7
@@
ZEBRA_RES zebra_begin_trans(ZebraHandle zh, int rw)
zh->records_updated = 0;
zh->records_deleted = 0;
zh->records_processed = 0;
zh->records_updated = 0;
zh->records_deleted = 0;
zh->records_processed = 0;
+ zh->records_skipped = 0;
#if HAVE_SYS_TIMES_H
times (&zh->tms1);
#if HAVE_SYS_TIMES_H
times (&zh->tms1);
@@
-1797,6
+1798,11
@@
ZEBRA_RES zebra_begin_trans(ZebraHandle zh, int rw)
if (val != 'o')
{
/* either we didn't finish commit or shadow is dirty */
if (val != 'o')
{
/* either we didn't finish commit or shadow is dirty */
+ if (!rval)
+ {
+ yaz_log(YLOG_WARN, "previous transaction did not finish "
+ "(shadow disabled)");
+ }
zebra_unlock (zh->lock_shadow);
zebra_unlock (zh->lock_normal);
if (zebra_commit (zh))
zebra_unlock (zh->lock_shadow);
zebra_unlock (zh->lock_normal);
if (zebra_commit (zh))
@@
-2082,6
+2088,7
@@
static ZEBRA_RES zebra_commit_ex(ZebraHandle zh, int clean_only)
if (val == 'd')
{
if (val == 'd')
{
+ /* shadow area is dirty and so we must throw it away */
yaz_log(YLOG_WARN, "previous transaction didn't reach commit");
clean_only = 1;
}
yaz_log(YLOG_WARN, "previous transaction didn't reach commit");
clean_only = 1;
}