private boolean prepareToRead() {
        try {
            if (!doPrepareToRead()) {
                return false;
            }
            return waitForPermit(AGENT_GLOBAL_READER_SOURCE_PERMIT, BATCH_READ_LINE_TOTAL_LEN);
        } catch (Throwable e) {
            LOGGER.error("prepare to read {} error:", instanceId, e);
            sourceError = true;
            return false;
        }
    }
Before reading the data source, some preparation operations need to be done, such as memory control semaphore
application and data source legitimacy verification

@return true if prepared ok
inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/sources/file/AbstractSource.java