|
52 | 52 | public class RetinaServerImpl extends RetinaWorkerServiceGrpc.RetinaWorkerServiceImplBase |
53 | 53 | { |
54 | 54 | private static final Logger logger = LogManager.getLogger(RetinaServerImpl.class); |
| 55 | + private static final Logger retinaLogger = LogManager.getLogger("retina"); |
55 | 56 | private final MetadataService metadataService; |
56 | 57 | private final IndexService indexService; |
57 | 58 | private final RetinaResourceManager retinaResourceManager; |
@@ -244,6 +245,20 @@ private void processUpdateRequest(RetinaProto.UpdateRecordRequest request) throw |
244 | 245 | this.retinaResourceManager.deleteRecord(rowLocation, timestamp); |
245 | 246 | } |
246 | 247 |
|
| 248 | + long indexId = primaryIndexKeys.get(0).getIndexId(); |
| 249 | + |
| 250 | + for (IndexProto.IndexKey indexKey : primaryIndexKeys) |
| 251 | + { |
| 252 | + retinaLogger.info("D\t{}\t{}\t{}\t{}\t{}\t{}", |
| 253 | + tableId, |
| 254 | + indexId, |
| 255 | + indexKey.getKey().asReadOnlyByteBuffer().getInt(), |
| 256 | + indexKey.getTimestamp(), |
| 257 | + tableUpdateData.getBucketId(), |
| 258 | + tableUpdateData.getTxIdBytes().toString() |
| 259 | + ); |
| 260 | + } |
| 261 | + |
247 | 262 | for (int i = 1; i < indexNum; i++) |
248 | 263 | { |
249 | 264 | List<IndexProto.IndexKey> indexKeys = indexKeysList.get(i); |
@@ -283,6 +298,24 @@ private void processUpdateRequest(RetinaProto.UpdateRecordRequest request) throw |
283 | 298 | } |
284 | 299 | long tableId = primaryIndexEntries.get(0).getIndexKey().getTableId(); |
285 | 300 | indexService.putPrimaryIndexEntries(tableId, primaryIndexId, primaryIndexEntries); |
| 301 | + |
| 302 | + for(IndexProto.PrimaryIndexEntry entry: primaryIndexEntries) |
| 303 | + { |
| 304 | + long indexId = entry.getIndexKey().getIndexId(); |
| 305 | + retinaLogger.info("P\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}", |
| 306 | + tableId, |
| 307 | + indexId, |
| 308 | + entry.getIndexKey().getKey().asReadOnlyByteBuffer().getInt(), |
| 309 | + entry.getIndexKey().getTimestamp(), |
| 310 | + entry.getRowId(), |
| 311 | + entry.getRowLocation().getFileId(), |
| 312 | + entry.getRowLocation().getRgId(), |
| 313 | + entry.getRowLocation().getRgRowOffset(), |
| 314 | + tableUpdateData.getBucketId(), |
| 315 | + tableUpdateData.getTxIdBytes().toString() |
| 316 | + ); |
| 317 | + } |
| 318 | + |
286 | 319 | for (int i = 1; i < indexNum; i++) |
287 | 320 | { |
288 | 321 | List<IndexProto.IndexKey> indexKeys = indexKeysList.get(i); |
|
0 commit comments