@@ -124,24 +124,25 @@ private boolean syncEntry(List<Entry> entrys) {
124124 updateColumn (versionField , rowData .getBeforeColumnsList (), table );
125125 updateColumn (versionField , rowData .getAfterColumnsList (), table );
126126 }
127- String text = JSON .toJSONString (versionField );
128- try {
129- Iterator <String > iterator = versionField .iterator ();
130- while (iterator .hasNext ()) {
131- if ("redis" .equals (GetProperties .target .get (canal_destination ).plugin )) {
132- RedisPool .incr (sign + Tool .md5 (iterator .next ()));
133- }
134- if ("memcached" .equals (GetProperties .target .get (canal_destination ).plugin )) {
135- MemPool .incr (sign + Tool .md5 (iterator .next ()));
136- }
127+ }
128+
129+ try {
130+ Iterator <String > iterator = versionField .iterator ();
131+ while (iterator .hasNext ()) {
132+ if ("redis" .equals (GetProperties .target .get (canal_destination ).plugin )) {
133+ RedisPool .incr (sign + Tool .md5 (iterator .next ()));
137134 }
138- if ( GetProperties .system_debug > 0 ) {
139- WriteLog . write ( canal_destination + ".access" , thread_name + "data(" + text + ")" );
135+ if ( "memcached" . equals ( GetProperties .target . get ( canal_destination ). plugin ) ) {
136+ MemPool . incr ( sign + Tool . md5 ( iterator . next ()));
140137 }
141- } catch (Exception e ) {
142- WriteLog .write (canal_destination + ".error" , thread_name + "redis link failure!" + WriteLog .eString (e ));
143- ret = false ;
144138 }
139+ if (GetProperties .system_debug > 0 ) {
140+ String text = JSON .toJSONString (versionField );
141+ WriteLog .write (canal_destination + ".access" , thread_name + "data(" + text + ")" );
142+ }
143+ } catch (Exception e ) {
144+ WriteLog .write (canal_destination + ".error" , thread_name + "cache link failure!" + WriteLog .eString (e ));
145+ ret = false ;
145146 }
146147 versionField .clear ();
147148 versionField = null ;
0 commit comments