public BlockAndRecord getTableRecordAndLock(RecordId recordId, List<Integer> columnIds, TableRecordMetadata meta, Set<Object> pinnedBlocks) {
		ListBlock block = (ListBlock) BlockManager.getInstance().getBlock(recordId.getPtr(), meta, pinnedBlocks);
		block.readLock();
		try {
			TableRecord record = (TableRecord) block.getRecord(recordId.getPosn());
			if (record == null) {
				return null;
			}
			
			int currentResourceCount = record.getResourceCount();
			if (record instanceof ExtendedTableRecord && (record.getColumnMap() == null || record.getColumnMap().size() == 0)) {
				RecordSerializer.getInstance().readFull(record, meta);
			}
			
			if (columnIds == null) {
				columnIds = new ArrayList<Integer>(meta.getColumnIdTypeMap().keySet());
			}
			
			for (int i = 0; i < columnIds.size(); i++) {
				int columnId = columnIds.get(i);
				DBType column = record.getColumnMap().get(columnId);
				if (column instanceof ExtendedColumn) {
					((ExtendedColumn) column).getValue(new ColumnSerializerMetadata(meta.getColumnIdTypeMap().get(columnId)));
				}
	 		}
			BlockAndRecord bar = new BlockAndRecord();
			bar.block = block;
			if (record != null) {
				bar.record = (TableRecord) record.copyOf();
			}
			block.adjustResourceCount(record.getResourceCount()-currentResourceCount);
			return bar;
		} finally {
			if (block != null) {
				block.readUnlock();
			}
		}
	}